- (defun mk3dpoly ( plst / plst plst1 ms points en) ;三维点表生成三维多段线
- (vl-load-com)
- ;(vla-AddPolyline (vxs(car(entsel)))) (vla-addlightweightpolyline (vxs(car(entsel))))
- ;(setq plst nil)
- ;(setq plst (vxs en) )
- (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 )
- (vlax-invoke-method ms 'Add3dPoly points)
- (princ)
- )
- ;(mk3dpoly (car(entsel)) ) (vlax-dump-object(vlax-ename->vla-object(car(entsel)))T) (vla-put-closed (vlax-ename->vla-object(car(entsel))) 0)
|