.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get the currently selected geometry

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
pfk
Enthusiast
611 Views, 3 Replies

Get the currently selected geometry

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

3 REPLIES 3
Message 2 of 4
Ajilal.Vijayan
in reply to: pfk
Message 3 of 4
pfk
Enthusiast
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

Message 4 of 4
pfk
Enthusiast
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

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost