View Full Version : SSget X except Frozen, Locked or Off layers
mailmaverick361505
2013-12-10, 05:40 AM
ssget X selects all objects that are on Frozen, Locked or Off Layers.
How to objects other than those which are on Frozen, Locked or Off Layers ?
Thanks.
pbejse
2013-12-10, 07:35 AM
ssget X selects all objects that are on Frozen, Locked or Off Layers.
How to objects other than those which are on Frozen, Locked or Off Layers ?
Thanks.
If you know lisp. collect all locked/off/on layers via tblnext or vla-get-layers and used that on the ssget exclusion filter.
mailmaverick361505
2013-12-10, 08:57 AM
Thanks for your reply.
But I do not know how to do it.
I would be grateful if you could please post the code for it ?
Thanks.
pbejse
2013-12-10, 11:02 AM
.I would be grateful if you could please post the code for it ?
Thanks.
Vanilla
(defun c:demo ( / a ex)
(setq ex nil)
(while (setq a (tblnext "LAYER" (null a)))
(if (and (or (> (cdr (assoc 70 a)) 0)
(minusp (cdr (assoc 62 a)))
)
(not (wcmatch (cdr (assoc 2 a)) "*|*"))
)
(setq ex (cons (strcat "," (cdr (assoc 2 a)) ) ex))
)
)
;;; For selection and processing ;;;
;;;(setq ss (ssget "_X"
;;; (append
;;; (list (cons 410 (getvar 'ctab)))
;;; (if ex
;;; (list
;;; '(-4 . "<NOT")
;;; (cons 8 (strcat (apply 'strcat ex)))
;;; '(-4 . "NOT>")
;;; )
;;; '(8 . "*")
;;; )
;;; )
;;; )
;;; )
;;;
(textscr)
;;; Demo purposes ;;;
(princ "\nExcluded Layers from selection:")
(foreach itm (reverse ex)
(princ (strcat "\n" (substr itm 2))))
;;; ;;;
(princ)
)
mailmaverick361505
2013-12-10, 02:52 PM
Thanks a lot pbejse .
hasancad
2013-12-12, 11:20 AM
May I sugest this tutorial
http://www.lee-mac.com/ssget.html
mailmaverick361505
2013-12-12, 11:22 AM
Thanks hasancad.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.