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.
Solved! Go to Solution.
Solved by xiaodong_liang. Go to Solution.
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 {
Wow that was so incredibly simple. Thank you once again for your assistance.
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