Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get user Selected objects in the C# api

Status
Not open for further replies.

vlholyoak

Mechanical
Joined
Dec 30, 2009
Messages
2
Location
US
I am trying to get a user selected sketch to perform actions with using the c# api. How do you get the Sketch object just by the user selecting it interactively?
 
You must first get the UI instance as follows:
UI userint = NXOpen.UI.GetUI();

Then the userint object has functions that will allow you to get the selected objects such as:

NXObject obj1 = userint.SelectionManager.GetSelectedObject(0);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top