Hello,
I am trying to use the CP ssget filter to create a selection set of all the attributed blocks that cross a polyline. I am basically doing this:
(setq p_list (list p_west p_east))
(ssget "_CP" p_list '((0 . "INSERT")(66 . 1)))
Attached is my LISP so far and a sample drawing with the polylines and blocks. Thanks.
Solved! Go to Solution.
Solved by calderg1000. Go to Solution.
Something else I was trying was this, but I couldn't get it to work either
(ssget "C" 'p_west 'p_east '((0 . "INSERT")(66 . 1)))
Regards @codyhornyak
Here you have two options...
;;;Option 1
(ssget "_f" p_list '((0 . "INSERT")(66 . 1))))
;;;Option 2
(ssget "_c" p_west p_east '((0 . "INSERT")(66 . 1))))
Carlos Calderon G
>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
The second option worked for me. The AutoLISP developer's guide isn't clear on which selection set methods you need underscores for or on when you need apostrophes in front of points. Thanks
Carlos Calderon G
>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Just my thoughts on the subject.
The CP is Crossing polygon, ie you must have at least 3 points making a closed type object note a rectang would have, pt1 pt2 pt3 pt4 pt1 note the last pt1 ensures closed shape. Gets what is touched. Else have a U.
The WP is get objects within a polygon of points.
The C is crossing, think of a line touching objects.
The F is fence, think of a pline gets what it touches.
The W is use a window 2 points are ok. Left-right v's Right-left can be different will check.
@codyhornyak wrote:
Something else I was trying was this, but I couldn't get it to work either
(ssget "C" 'p_west 'p_east '((0 . "INSERT")(66 . 1)))
Don't use the ' before variable names.
@codyhornyak wrote:
...The AutoLISP developer's guide isn't clear on which selection set methods you need underscores for or on when you need apostrophes in front of points. Thanks
Never mind underscores if you use the English ACAD version.
I can't think of a single situation where apostrophes were required before point. Would you show us that part of the guide which so confuse you?
I see, there is (ssget '(2 2)) for example where '(2 2) represents a point coordinates.
That apostrophe has nothing to do with ssget. It's just the simplest way to define a list of point coordinates: '(2 2).
(list 2 2) will give you the same result. But (list) can evaluate variables. (setq a 2) (list a a) but not '(a a)
Save to a variable: (setq pt '(2 2))
or the same by list (setq pt (list 2 2))
Now, using that variable within ssget: (ssget pt)
Also found THIS Lee's explanation.
Can't find what you're looking for? Ask the community or share your knowledge.