PDA

View Full Version : 3d Poly Explode



Zuke
2009-03-12, 10:44 PM
Does anyone have a lisp that will explode all 3d poly lines?

CADmium
2009-03-13, 07:43 AM
(defun c:3dplexplode(/ AWS I)
(if(setq AWS(ssget "_X" (list '(0 . "POLYLINE")
'(100 . "AcDb3dPolyline") ;<- don't work ??
(cons 410 (getvar "CTAB"))
)
)
)
(progn
(setq I -1)
(repeat (sslength AWS)
(setq OBJ(ssname AWS(setq I(1+ I))))
(if(vl-remove-if-not '(lambda(X)(and(=(car X)100)
(=(type(cdr X))'STR)
(=(strcase(cdr X))"ACDB3DPOLYLINE")
)
)
(entget OBJ)
)
(command "_explode" OBJ)
)
)
)
)
)

Bruno.Valsecchi
2009-03-13, 01:25 PM
'(100 . "AcDb3dPolyline") ;<- don't work ??

Make your filter with flag 70


(cond
((setq js
(ssget "_X"
(list
'(0 . "POLYLINE")
(cons 410 (getvar "CTAB"))
'(-4 . "&")
'(70 . 8)
)
)
)
(repeat (setq n (sslength js))
(command "_.explode" (ssname js (setq n (1- n))))
)
)
)