Here is what I have read lately about the same theme that you asking about pBe .
Interesting thread . http://www.theswamp.org/index.php?topic=38612.msg437172#msg437172
Tharwat
Thank you for the link Tharwat.
Guess the short answer is NO. or maybe NOT YET or even NEVER.
They probably have a good reason for that.
I'll investigate further Agreed .
Cheers!
Tharwat has already shown you another great example, courtesy of Lee. :wink:
To add a bit more to the explanation, here's some additional documentation on SSGET:
As the "X" option searches the entire drawing database, you must utilize the filter to limit the included entity pointers in the selection set, or you must conditionally filter out what you do not want from the returned selection set... hope that makes sense. You might also want to consider using SSGET's "A" mode:
My version:
(defun c:xrlayer ( / a b c d layer ) (setq layer "G-XREF") (while (setq a (tblnext "BLOCK" (null a))) (if (= 4 (logand 4 (cdr (assoc 70 a)))) (setq b (cons "," (cons (cdr (assoc 2 a)) b))) ) ) (if (setq c (ssget "_X" (list (cons 0 "INSERT") (cons 2 (apply 'strcat (cdr b))) (cons 8 (strcat "~" layer)) ) ) ) (repeat (setq d (sslength c)) (entmod (list (cons -1 (ssname c (setq d (1- d)))) (cons 8 layer))) ) ) (princ)) Interesting approach Lee, collecting locked layer names and using that for exclusion filter
Clever
Thanks for the info Renderman.
Thanks pBe, I assume you are referring to my example at theSwamp Yup.. your new code here used a different approach. Block names.
Nice
页:
1
[2]