.NET

Reply
Active Contributor pfk
Active Contributor
Posts: 26
Registered: ‎02-11-2013
Message 1 of 4 (185 Views)
Accepted Solution

Get the currently selected geometry

185 Views, 3 Replies
10-12-2013 03:14 PM

Hi

 

Is it possible to get a selection set for the currently selected geometry?  If I use the EditorInput selection functions, the user is asked to select an item, however I want the item(s) that has already been selected prior to running the plugin.

 

Thanks

Valued Mentor
Ajilal.Vijayan
Posts: 371
Registered: ‎01-12-2008
Message 2 of 4 (166 Views)

Re: Get the currently selected geometry

10-12-2013 10:22 PM in reply to: pfk
Active Contributor pfk
Active Contributor
Posts: 26
Registered: ‎02-11-2013
Message 3 of 4 (105 Views)

Re: Get the currently selected geometry

10-17-2013 09:28 PM in reply to: Ajilal.Vijayan

Thank you for the link - it certainly helps.  However there are still some challenges in this area - particularly when debugging.  I am finding that the ed_SelectionAdded and ed_SelectionRemoved events need to be treated carefully.  My code for SelectionAdded fills a combobox with the names of items that have been selected, and the combobox.add method seems to trigger another ed_SelectionAdded event leading to some nasty recursion.  Or it couldn't be the debug breakpoints causing this.  Regardless - the VS debugger ends up locking and finding to root cause is difficult.

 

Paul

Active Contributor pfk
Active Contributor
Posts: 26
Registered: ‎02-11-2013
Message 4 of 4 (104 Views)

Re: Get the currently selected geometry

10-17-2013 09:34 PM in reply to: pfk

EDIT: The solution to this recusion is to set a "dirty" flag in the ed_SelectionAdded event, and then Application_Idle event.

 

Paul

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community