Jump to content

ssGet function


Costinbos77

Recommended Posts

Hello!

 

If you want to select a particular type of object on a specified position, ssGet function fails when multiple objects are overlapped in that place.

 


(setq ss (ssGet '(0 0) '((0 . "circle")) )  )

 

How can resolve this deficiency?

 

Thanks in advance.

Costin

Overlapping.jpg

Edited by Costinbos77
Link to comment
Share on other sites

It doesn't fail, nor is this a deficiency, Costin! It just replicate AutoCAD's behavior on pick selection (that it, retrive one entity).

Link to comment
Share on other sites

(setq ss (ssget '((0 . "circle"))))

Please note that this statement will require user's interaction and this may not be what OP is looking for.

Link to comment
Share on other sites

I need to select through coordinates.

I want to find all circles, points, or blocks with attributes that are in the vertices of the polyline and not the green circle. But in those vertices , other objects are blocking the selection.

Edited by Costinbos77
Link to comment
Share on other sites

Costin, I noticed that meantime you added a picture to your post. Can you clarify, please, which are the coordinates of that circle's center? If those were 0, 0, 0, then you cannot select it like the statement above since picking on that point will require either a very small zoom factor or a very large pickbox to intersect its circumference.

Rather try to filter for center's coordinates:

(setq ss (ssget [color=magenta]"_X"[/color] '((0 . "CIRCLE") [color=magenta](10 0.0 0.0 0.0)[/color])))

Link to comment
Share on other sites

Thanks Mircea. Works.

 

I tried another time and it did not work, I probably forgot to do zoom in the area.

 



(setq ss (ssget "_X" '((0 . "CIRCLE") (cons 10 [color="red"]p[/color]))))


where [color="red"]p[/color] = (x y) , automatically z = 0 .
or 
(x y z)

 

If circles are coordinated 3D and polyline is 2D ( even with elevation ) ,

or If circles are coordinated 2D and polyline is 3D ,

then not select anything.

 

 

Then here and solving :

 

(setq ss (ssGet "_X" (list '(0 . "Circle") '(-4 . "=,=,*") (cons 10 [color="red"]p[/color]))) )

Edited by Costinbos77
Link to comment
Share on other sites

For the problem that the circle is not quite exactly on a Pline vertice if thats your search pt use below, window must be slightly larger than circle diameter.

 

(setq ss (ssget "_W" pt1 pt2 '((0 . "CIRCLE") )))

Link to comment
Share on other sites

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...