Author Topic: Exclude from selection set  (Read 925 times)

0 Members and 1 Guest are viewing this topic.

AcoCar

  • Mosquito
  • Posts: 8
Exclude from selection set
« on: January 27, 2022, 04:54:49 AM »
Guys i need small help, i need to select everything inside polygon defined by 4 points, but also need to exclude entity that i previously selected.
i have this
Code: [Select]
(setq p0 (ssget "_CP" (list tt4 tt2 tt3 tt1) (list (cons -4 "<>") (cons -1 en) (cons -4 "<>"))))
en is entity name that i dont need in selection, when i run this i got nil selection for some reason and i have several entities inside this box, am i doing something wrong with selection exclusion? Any help will be nice :)
« Last Edit: January 27, 2022, 06:44:39 AM by AcoCar »

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Exclude from selection set
« Reply #1 on: January 27, 2022, 12:19:52 PM »
You need to have the objects visible and not off the screen otherwise ssget won't be able to make the selection if criteria met of course.

Then after you get the above selection of objects, you can use the function ssdel over the new selection set to delete entities if any available in the previous selection set.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Exclude from selection set
« Reply #2 on: January 31, 2022, 06:50:18 PM »
You cannot filter for entity names in an ssget filter list - this is noted in the documentation:
The ssget function recognizes all group codes except entity names (group code -1), handles (group code 5), and xdata (group codes greater than 1000). If an invalid group code is used in a filter-list, it is ignored by ssget.

Instead, obtain your selection and remove the unwanted entity using the ssdel function.