Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selecting an object closest to a point -- ssget

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
786 Views, 0 Replies

Selecting an object closest to a point -- ssget

I have a small routine that helps me select an object after I extend a line to it. This object is on a different layer from the line, so I simply find an end point of the line and use it with a filter to select the object of interest.

 

(setq obj_of_interest  (ssget "C" line_end_pt line_end_pt (list (cons 8 obj_layer))))

 

However, sometimes the result of the command is wrong as it picks up not only the object of interest but other closely drawn objects on obj_layer. I think it has to do with pickbox size. I, of course, can change the pickbox size for the duration of the command to make it work a bit more consistently, but is there a way to do it to be always consistent and truly select only the object that the line is extended to? I want the command to select the closest obj on obj_layer to a point. Thanks

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost