Sorry, if I don't understand what you
exactly need
Here is rotine to make 3d pipes by
selected paths
~'J'~
;; PiP.lsp
;; Fatty T.O.H. () 2006 * all rights removed
(defun unitv (vect / un)
(if (zerop
(setq un (distance '(0 0 0) vect)))
nil
(mapcar (function (lambda (x) (/ x un))) vect)
)
)
(defun c:pip (/ acsp adoc icirc irad ireg norm ocirc orad oreg spt ss x)
(or (vl-load-com))
(setq adoc (vla-get-activedocument
(vlax-get-acad-object)
)
)
(if (and
(= (getvar "tilemode") 0)
(= (getvar "cvport") 1)
)
(setq acsp (vla-get-paperspace adoc))
(setq acsp (vla-get-modelspace adoc))
)
(vla-endundomark adoc)
(vla-startundomark adoc)
(vla-startundomark adoc)
(if
(setq ss
(ssget
'((-4 . "<OR")
(0 . "LINE,CIRCLE,ARC,ELLIPSE,LWPOLYLINE")
(-4 . "<AND")
(0 . "SPLINE")
(-4 . "&")
(70 . 8)
(0 . "POLYLINE")
(-4 . "<NOT")
(-4 . "<OR")
(-4 . "!=")
(70 . 16)
(-4 . "&")
(70 . 112)
(-4 . "OR>")
(-4 . "NOT>")
(-4 . "AND>")
(-4 . "OR>")
)
)
)
(progn
(setq orad (getreal "\n Outer radii: ")
irad (getreal "\n Inner radii: "))
(vlax-for obj (vla-get-activeselectionset adoc)
(setq spt (vlax-curve-getpointatparam
obj
(vlax-curve-getstartparam obj)
)
)
(setq norm (unitv (vlax-curve-getfirstderiv
obj
(vlax-curve-getstartparam obj)
)
)
)
(setq ocirc (vlax-invoke acsp 'AddCircle spt orad))
(setq icirc (vlax-invoke acsp 'AddCircle spt irad))
(vla-put-normal ocirc (vlax-3d-point norm))
(vla-put-normal icirc (vlax-3d-point norm))
(setq oreg (car (vlax-invoke acsp 'Addregion (list ocirc))))
(setq ireg (car (vlax-invoke acsp 'Addregion (list icirc))))
(vla-boolean oreg acsubtraction ireg)
(vla-addextrudedsolidalongpath acsp oreg obj)
(mapcar (function (lambda (x)
(vl-catch-all-apply
(function (lambda ()
(progn
(vla-delete x)
(vlax-release-object x)))))))
(list obj ocirc icirc oreg))
)
)
)
(vla-endundomark adoc)
(princ)
)
(princ "\n Start command with PiP ...")
(prin1)