AnsweredAssumed Answered

VB.NET Addin: How to create a single command, not a command group?

Question asked by Ross John on Apr 2, 2017
Latest reply on Apr 3, 2017 by Ross John

Hello everyone!

I am using standard VB.NET Addin templete and confused with the ICommandManger. Link:


In the VB.NET Addin templete, the two commands are created in GreateCommandGroup2. Quote from the templete:

        cmdIndex0 = cmdGroup.AddCommandItem2("CreateCube", -1, "Create a cube", "Create cube", 0, "CreateCube", "", mainItemID1, menuToolbarOption)

        cmdIndex1 = cmdGroup.AddCommandItem2("Show PMP", -1, "Display sample property manager", "Show PMP", 2, "ShowPMP", "PMPEnable", mainItemID2, menuToolbarOption)


My question: If I only need to create one single command, do I have to create a command group first, then put that single command into the command group? Is this the correct way? Or is there some other methods to create such a single command?


Furthermore: Is it OK if I create multi CommandGroup in one Addin file? (I have not tried yet.)


Thank you!