- (defun vxs (e / i v lst ppp)
- (setq i 0)
- (while
- (setq v (vlax-curve-getpointatparam e (setq i (1+ i))))
- (setq lst (cons v lst))
- )
- (setq ppp (reverse lst) )
- (append (list(vlax-curve-getpointatparam e 0)) ppp )
-
- )
- (vl-load-com)
- ;(vla-AddPolyline (vxs(car(entsel)))) (vla-addlightweightpolyline (vxs(car(entsel))))
- (setq plst nil)
- (setq plst (vxs(car(entsel))) )
- (setq plst1 (apply 'append
- (append plst (list (car plst)))
- ) )
- (setq points
- (vlax-make-safearray
- vlax-vbdouble
- (cons 0 (- (length plst1) 1))
- )
- )
- (vlax-safearray-fill points plst1)
- (setq ms
- (vla-get-ModelSpace
- (vla-get-ActiveDocument
- (vlax-get-acad-object)
- )
- )
- )
- (vla-AddPolyline ms points )
|