0 Members and 1 Guest are viewing this topic.
(defun c:fz0(/ cSet)(setq cSet (ssget '((-4 . "*,*,=") (10 0.0 0.0 0.000) (-4 . "<NOT") (0 . "LWPOLYLINE,POLYLINE");;not polylines (-4 . "NOT>") ) ) ) (if cSet (progn (princ(strcat "\n" (itoa(sslength cSet)) " found.")) (sssetfirst nil cSet) ); end progn (princ "\nNothing found. ") ); end if (princ) ); end of c:fz0
(setq cset (ssget "x" '((-4 . "<OR") (-4 . "*,*,=") (10 0.0 0.0 0.000) (-4 . "*,*,=") (10 0.0 0.0 -999.0) (-4 . "OR>") (-4 . "<NOT") (0 . "LWPOLYLINE,POLYLINE") ;;not polylines (-4 . "NOT>") ) ))
Quote from: CAB on January 14, 2009, 11:20:21 AMd-unitcould you post a sample DWG for testing?There are 4 Mtext and 3 leader objects that are at Z=2700 that will not go to Z=0 using the attached code.Thanks in advance CAB.(Also, it looks like there is a block that has an attribute on a different Z value as well. I haven't looked into that one yet.)
d-unitcould you post a sample DWG for testing?
Quote from: d-unit on January 14, 2009, 11:30:12 AMQuote from: CAB on January 14, 2009, 11:20:21 AMd-unitcould you post a sample DWG for testing?There are 4 Mtext and 3 leader objects that are at Z=2700 that will not go to Z=0 using the attached code.Thanks in advance CAB.(Also, it looks like there is a block that has an attribute on a different Z value as well. I haven't looked into that one yet.)See link in Ron's post or the old Flatten worked too.Maybe because it has a dictionary attached, not sure but don't have time to investigate at the moment.
This seems to work: