Jump to content

Create Selection Set if Color is NOT BYLAYER?


Recommended Posts

Posted

 

To create a selection set of objects of a specific color is pretty straight forward

 

 (if (setq ss1 (ssget "_X" '((62 . 5))))

 

I want to create a selection set if the color is not BYLAYER (someone has manually changed the color)

Posted
(setq ss1 (ssget '((-4 . "<NOT") (62 . 256) (-4 . "NOT>"))))

 

  • Like 1
  • Agree 1
Posted
(setq ss1 (ssget "X" '((-4 . "<NOT") (62 . 256) (-4 . "NOT>"))))

 

Posted

can I add another facet to this question?

 

Can 2 different colors be selected via ssget X ?

This doesn't work.. (I was trying..)

(ssget "_X" '((62 . 7) (62 . 8))))

 

Posted

ps: and thank you for the responses!

Posted
(ssget "_X" '((-4 . "<OR") (62 . 7) (62 . 8) (-4 . "OR>")))

 

  • Agree 1
Posted

Awesome! Thanks much!

 

Posted

Not BYLAYER

(setq ss1 (ssget '((-4 . "!=")(62 . 256))))

 

Selection of color 7 to 11

(setq ss1 (ssget "X" '((-4 . ">=") (62 . 7) (-4 . "<=") (62 . 11))))

 

  • Like 2
  • Agree 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...