Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding an item to the right click menu in the Selection Tree

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
1291 Views, 3 Replies

Adding an item to the right click menu in the Selection Tree

I've made MyFancyPlugin that does random stuff to an object when the user runs it.

Currently, to run the plugin, the user has to select the object in the selection tree, go to the Add-Ins panel, and click the MyFancyPlugin button.

 

What do I need to do (or where should I be looking) to add an element to the existing right click menu (for selection tree objects) that says "MyFancyPlugin" and runs the plugin once it's clicked.

 

Thank you!

 

edit: I'm okay if the user has to click MyFancyPlugin in the Add-Ins panel one time to load the plugin initially. After the initial run (per session of Navisworks of course) I'd like it to appear in the right-click menu.

3 REPLIES 3
Message 2 of 4
xiaodong_liang
in reply to: Anonymous

Hi,

 

If you define the addin like below, you can see your context menu.

 

[PluginAttribute("BasicPlugIn.ABasicPlugin", //Plugin name
"ADSK", //4 character Developer ID or GUID
ToolTip = "BasicPlugIn.ABasicPlugin tool tip",//The tooltip for the item in the ribbon
DisplayName = "MyContextMenu",
Options = PluginOptions.SupportsControls)] //Display name for the Plugin in the Ribbon

[AddInPlugin(AddInLocation.CurrentSelectionContextMenu)]
public class ABasicPlugin : AddInPlugin //Derives from AddInPlugin
{

 

Message 3 of 4
Anonymous
in reply to: xiaodong_liang

Wow that was so incredibly simple. Thank you once again for your assistance.

Message 4 of 4
Anonymous
in reply to: xiaodong_liang

Hi xiaodong.liang

 

I would like add new context menu at Bottom row in menu right click. Is there a way to do this?
Any tips on these will be great help.
Thanks in advance.

 

Regards,
minh.hn

Tags (2)

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report