Hi all,
I know that this may seem trivial but I'm having difficulty sorting it out. I want to build a selectionset beginning with a box selection and then only return blocks by name into a selectionset.
(setq ss (ssget "X" (list (cons 0 "INSERT") (cons 2 "PP"))))
Can't I just add some mode designation? If so then what, and should I be using the "X" also to ensure that I get all "PP" blocks within the box area?
Thank you in advance for any help.
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
(setq ss (ssget "_WP" (list (cons 0 "INSERT") (cons 2 "PP"))))
I'd expect this to work but I only get a bad list error.
@mid-awe wrote:
Should I use "_CP" to allow the use to define the window or box selection first?
The CP selection method [as well as WP, C, W, and F] needs a pre-defined point list supplied to it. You could ask the User to select points to put into that list, but I believe that needs to be before you get into (ssget), so the list of points can be supplied as an argument.
But the selection-method argument is optional. If you want the User to build a selection area within the (ssget), you can just use (ssget) without any selection method, but with only the entity-type and Block-name filtering [your original without the "X"], and they can use whatever combination of selection methods they choose, including all those as well as individual pick-selection, removing, etc., just as they would for object selection in any editing command but with the benefit of the filtering.