Correct syntax of SSGET with :E

Correct syntax of SSGET with :E

tcorey
Mentor Mentor
1,990 Views
5 Replies
Message 1 of 6

Correct syntax of SSGET with :E

tcorey
Mentor
Mentor

 

I am attempting to use SSGET's "_:E" function, but I have been unable to find an example.

 

If I use (setq obs (ssget "_:E")), the user is asked to pick a point. It correctly finds all objects touched by the pickbox. Sweet, but I want to feed a point variable to the function, not make the user pick.

 

If I use (setq obs (ssget "_:E pt)), I get error: bad point argument

 

and the same if I use (setq obs (ssget pt "_:E"))

 

Thanks, if you can help.

 

Tim



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Accepted solutions (1)
1,991 Views
5 Replies
Replies (5)
Message 2 of 6

Ranjit_Singh
Advisor
Advisor
Accepted solution

You can simply pass a point in ssget as

(ssget pt1); where pt1 is a list of x y and z

but it will only select a single entity that is on top of other entities at that point. To select multiple you need to call other methods. Example with fence

 

(ssget "_f" (list (mapcar '- pt1 '(0.01 0 0)) (mapcar '+ pt1 '(0.01 0 0))))
Message 3 of 6

tcorey
Mentor
Mentor

Thanks for your reply, but the :E switch is meant to find all objects within the pickbox. From the Help:

 

:E Everything within the cursor's object selection pickbox.

 

Here's a link if you want to see the entire article:

 

http://docs.autodesk.com/ACD/2011/ENU/filesALR/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-693e.htm

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
0 Likes
Message 4 of 6

Ranjit_Singh
Advisor
Advisor

You are correct. But as far as I know you cannot pass a point argument to E: ssget method. The method that I pointed out with point is not the same as E: and isn't documented. Never the less, that is the only way, as far as I know where you can pass a single point as an argument.

You will have to use fence or cp, if you wish to select all objects at a point. I would be very eager to find out if there is anyother ssget way to pass a point argument and select multiple objects that cross at a point.

Message 5 of 6

tcorey
Mentor
Mentor

Thanks for the clarification. It appears the :E function is only for use when there will be user input, I guess. That's a bummer, but c'est la vie.

 

I am going to follow your advice and use crossing.

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
0 Likes
Message 6 of 6

Ranjit_Singh
Advisor
Advisor

You are welcome.

0 Likes