Hi,
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() { }
}
}