SolidDna's Command Bar Tutorial


Here’s a generic main code for starting a new command bar acording to the SolidDna’s tutorial.

The issue is a duplicated command bar.

Have installed the SolidDna nuget.

@PeterBrinkhuis , could you help me?

using AngelSix.SolidDna;

namespace Command_Bar
    public class MyAddin : AddInIntegration

        public override void ApplicationStartup() { }

        public override void PreConnectToSolidWorks() { }

        public override void PreLoadPlugIns() { }

    public class MyPlugIn : SolidPlugIn

        public override string AddInTitle => "Eletromei Command Bar";

        public override string AddInDescription => "Custom Eletromei's command bar.";

        public override void ConnectedToSolidWorks()
            var commandBar = AngelSix.SolidDna.SolidWorksEnvironment.Application.CommandManager.CreateCommandGroupAndTabs("Ferramentas Eletromei", new System.Collections.Generic.List<CommandManagerItem>( new[]
                new CommandManagerItem()
                    Name = "Export DXF",
                    Tooltip = "DXF",
                    Hint = "Exportar DXF",
                    VisibleForAssemblies = true,
                    VisibleForDrawings = false,
                    VisibleForParts = true,
                    AddToTab = true,
                    OnClick = () => { }
            }), null);

        public override void DisconnectedFromSolidWorks() { }

What do you mean with “duplicated command bar”, can you share a screenshot?

We recently deprecated CreateCommandGroupAndTabs and replaced it with CreateCommandTab (for a toolbar tab) and CreateCommandMenu (for a Tools menu). This way, each of the method creates one menu and it only takes arguments that it really needs. Can you try one of these?

Here’s the screen shot:

I can only access CreateCommandGroupAndTabs from AngelSix.SolidDna namespace:

var commandBar = AngelSix.SolidDna.SolidWorksEnvironment.Application.CommandManager

Installed SolidDna nuget version:

Got the solution:

Install the CADBooster nuget, follow the tutorial and add latest Solidworks DLL as reference.