Selecting geometry



I have Solid Edge 20.


I need to inquire the information about selected geometry using VB. The selection is performed by mouse pick.

Is there any method that can bring me the selected (by mouse!!!) object with all its information?


Thanks a lot!




Posted by: Baba baban
Post date: 10/29/2008 6:37:23 AM


RE: Selecting geometry

After you've connected to Edge, look at the .ActiveSelectSet


Posted by: Bill Ledbetter
Post date: 10/31/2008 4:25:10 AM

RE: Selecting geometry




First of all, thank you for your answer. But I'm still confused with this issue. What do you mean when you say " After you've connected to Edge..."?


I receive an object of type Object from the mouse pick? I can not apply an ActiveSelectSet property on it. I can only write:

MyObj.Application.ActiveSelectSet, but in this case I see that the select set is empty. Am I do anything wrong? How can I connect to the Edge?


Thank you.



Posted by: Baba baban
Post date: 11/3/2008 4:37:02 AM

RE: Selecting geometry

1. Have you made a connection similiar to:

Set seAPP = GetObject(, "SolidEdge.Application")

Set seDOC = seAPP.ActiveDocument


2. Have you coded a MousePick routine?


If you are already connected to Edge and have the object selected via the mouse pick, the info for said object us retrievable via:


There we other samples of code on Jason's site explaining how to set up a Mouse pick.



Posted by: Bill Ledbetter
Post date: 11/3/2008 4:54:18 AM

RE: Selecting geometry

See the nSidePolygon example in C:\Program Files\Solid Edge XX\Custom folder. The guts of what you're wanting to do revolve around the CreateCommand() method. You'll also have to configure AddToLocateFilter() appropriately.


Posted by: Jason Newell
Post date: 11/3/2008 6:34:40 AM

RE: Selecting geometry


I don't have a big experience programming with SE, so may be my questions are a little bit stupid.... I'm sorry.

I have  a connection to Application and I have a Mouse Pick routine. The only thing I still don't understand is who is responsible to fill the ActiveSelectSet and when the selected object is added to this set?

When I get to the routine that handles mouse pick, my ActiveSelectSet is empty.



Posted by: Baba baban
Post date: 11/3/2008 7:00:27 AM

RE: Selecting geometry


Thanks Jason,

I will look into this example.


Posted by: Baba baban
Post date: 11/3/2008 7:01:14 AM