 - ;;;一个vlisp方法,将三维多线段转为LWPOLYLINE
- (defun c:tt (/ lst)
- (setq lst
- (Vlax-Get
- (Vlax-Ename->Vla-Object (car (entsel "\n选择三维多线段:")))
- 'Coordinates
- )
- )
- (defun tt-2 (lst)
- (if lst
- (append (list (car lst) (cadr lst)) (tt-2 (cdddr lst)))
- )
- )
- (setq lst (tt-2 lst))
- (Vlax-Invoke-Method
- (Vlax-Get (Vlax-Get (Vlax-Get-Acad-Object) 'ActiveDocument)
- 'ModelSpace
- )
- 'AddLightWeightPolyline
- (vlax-safearray-fill
- (vlax-make-safearray
- vlax-vbDouble
- (cons 0 (1- (length lst)))
- )
- lst
- )
- )
- (princ)
- )
|