Code Red > AutoLISP (Vanilla / Visual)
List layername & entity's layername that is in/or has overridden with magenta
tive29:
part of my job involves checking if any layername & entity is in/or has overridden with magenta colour
Short of eyeballing the whole drawing visually & missing out some obsecure entity, is there a LISP or LISPs that can do it faster :
1) list out the layer name that is in magenta colour
2) list out the layer name of the entity that is override with magenta colour
3) (if possible) a way to isolate or zoom in to those entity that is in magenta colour or entity override with magenta colour
ronjonp:
Paste this into the command line: (sssetfirst nil (ssget "_x" '((62 . 6)))) It will highlight all objects that have a magenta color by object setting.
I'm not sure about your layer question?
Lee Mac:
The following will select all objects in the current space which are displaying a colour of magenta:
--- Code - Auto/Visual Lisp: ---(defun c:magenta ( / l x ) (while (setq x (tblnext "layer" (not x))) (if (= 6 (abs (cdr (assoc 62 x)))) (setq l (vl-list* "," (cdr (assoc 2 x)) l)) ) ) (sssetfirst nil (ssget "_X" (append (if l (list '(-4 . "<OR") '(62 . 6) '(-4 . "<AND") '(62 . 256) (cons 8 (apply 'strcat (cdr l))) '(-4 . "AND>") '(-4 . "OR>") ) '((62 . 6)) ) (if (= 1 (getvar 'cvport)) (list (cons 410 (getvar 'ctab))) '((410 . "Model")) ) ) ) ) (princ))
tive29:
Hello Lee Mac Thank you for the lisp. I forgot to mention that these entities are mainly in blocks & nested blocks hence i need to visually spot them out. If you could see a way to this that that will be fantastic.
That said, this LISP will be very useful in another of my project.
ronjonp:
Next question. What do you do once you spot these items out ?
Navigation
[0] Message Index
[#] Next page
Go to full version