(defun c:test ( / var val PL v LL)
(setq var '(cmdecho loftnormals loftparam) ;LM
val (mapcar 'getvar var) ;LM
)
(mapcar 'setvar var '(0 0 7)) ; <- JB
(if (and
(setq PL (car (entsel "\nSelect Polyline")))
(setq v (getpoint "\nSelect apex"))
)
(progn
(foreach x (pl_coord PL)
(setq LL (cons (entmakex (list '(0 . "LINE") (cons 10 x) (cons 11 v))) LL))
)
(command "_loft")
(apply 'command LL)
(command "" "")
(foreach x LL
(if (not (vlax-erased-p x)) (entdel x))
)
)
)
(mapcar 'setvar var val)
(princ)
)
(defun pl_coord (# / p m)
(setq p (if (vlax-curve-IsClosed #)
(fix (vlax-curve-getEndParam #))
(1+ (fix (vlax-curve-getEndParam #)))
)
)
(while (/= 0 p)
(setq m (cons (vlax-curve-getPointAtParam # (setq p (1- p))) m))
)
)
Thanks for replys... However, my example isn't quite what should be... I thought 2d/3dplinecurve entity - so only real new POLAR EXTRUDE command could be what is needed... I've posted this topic into Wish list for newer release... As there are many 3d commands that are built-in A2014 that are even more complex than this, I thought this will fulfill CAD arsenal... Lofting is nearest to what I was looking for, or suggested edgesurf command, but I really think this is what is missing - I often have this kind of situation (3 edges + apex point) and I solved this before with 0-line as 4th edge... But is this 0-line necessity?
Try this, Marko.Code: [Select](defun c:test ( / var val PL v LL)
(setq var '(cmdecho loftnormals loftparam) ;LM
val (mapcar 'getvar var) ;LM
)
(mapcar 'setvar var '(0 0 7)) ; <- JB
(if (and
(setq PL (car (entsel "\nSelect Polyline")))
(setq v (getpoint "\nSelect apex"))
)
(progn
(foreach x (pl_coord PL)
(setq LL (cons (entmakex (list '(0 . "LINE") (cons 10 x) (cons 11 v))) LL))
)
(command "_loft")
(apply 'command LL)
(command "" "")
(foreach x LL
(if (not (vlax-erased-p x)) (entdel x))
)
)
)
(mapcar 'setvar var val)
(princ)
)
(defun pl_coord (# / p m)
(setq p (if (vlax-curve-IsClosed #)
(fix (vlax-curve-getEndParam #))
(1+ (fix (vlax-curve-getEndParam #)))
)
)
(while (/= 0 p)
(setq m (cons (vlax-curve-getPointAtParam # (setq p (1- p))) m))
)
)