How to assign large icons to Solidworks commands via Solidworks addin (C#)?)

I’m creating Solidworks addin with C# temaplete. But I’m unable to assign large icons to my commands.

It is by default considering 16*16 size like below…

I need to assign larger icons to these commands, please help me to achieve this via api (C#)

cmdGroup.LargeIconList = iBmp.CreateFileFromResourceBitmap(“Xport.toolbar96x.png”, thisAssembly);
cmdGroup.SmallIconList = iBmp.CreateFileFromResourceBitmap(“Xport.toolbar64x.png”, thisAssembly);
cmdGroup.LargeMainIcon = iBmp.CreateFileFromResourceBitmap(“Xport.mainicon_96.png”, thisAssembly);
cmdGroup.SmallMainIcon = iBmp.CreateFileFromResourceBitmap(“Xport.mainicon_64.png”, thisAssembly);

It looks like those icon methods have since been replaced by different icon handling methods. Can you tried these and see if that fixes your icon size issue?

1 Like