Set a keyboard shortcut for any of your add-ins command then export SOLIDWORKS settings. When you edit the output file, you'll be able to see what registry key were associated with your command.
Thank you. This was going to be a follow up question
We have this problem too with our in-house tools. To get your add-in buttons on the shortcut bars:
Copy your buttons to an already visible toolbar (i use the menu bar myself)
Switch to tools>customize>shortcut tab
drag your buttons onto the shortcut
(side note: this works for other add-ins too, like workgroup pdm icons)
As for keyboard shortcuts, your commands should be in the list of commands somewhere. Have you tried searching for them?
I think i need a bit more help. When i go to "Toolbars" i can make our add-in Toolbar visible. However in the "Shortcut Bars" it is not available. Additionally i tried dragging a shortcut from our toolbar to the 2d to 3d toolbar in the interface, but that didn't make it available in the "Shortcut Bars" tab.
For the keyboard short cut i tried searching. However it seems only out help section is available for keyboard shortcuts. Can it be related to the fact that our help section is the only thing in the Menus. Everything else is "only" made available through the command manager and a toolbar
"Additionally i tried dragging a shortcut from our toolbar to the 2d to 3d toolbar in the interface, but that didn't make it available in the "Shortcut Bars" tab."
You need to drag the icon to a toolbar (2d toolbar for example), then switch to the Tools>Customize>Shortcut tab on the customize dialog page. Now drag the icon off the 2d toolbar and onto your shortcut bar.
Ahh.. NOW i get it. Thank you very much
Just writing a follow with some answers to the rest of the question.
First things. To add a keyboard shortcut you have to add menu items for the features you want keyboard shortcuts for. It is not enough for them to be in a toolbar or the command manager. This is done with SwAddin.AddMenuItem5 . After doing that you will see your menu items available in the Tool->Costumize->Keyboard shortcuts. Here you can bind shortcuts to you menu items.
If you want to provide default shortcuts to you menu items, this is done through editing the Registry. To see how this looks you can bind a shortcut to one or more of you menu items and go to Tools->Save/Restore Settings. This gives you a registry file showing the structure. It was not immediately apparent to me what the system was, so i will just give short summary. They apparently use this structure: Accel
When exporting your setting it will come out looking something like this:
[HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2017\Customization\tPlate0\Custom Accelerators\AddArray\31_65] "fVirt"=dword:0000001f "key"=dword:00000041 "cmd"=dword:00008673
For unknown reason it actually outputs this three time with "tPlate0" tPlate1" and "tPlate2" for me.
Apart from that, there are 4 variables hidden in this registry entry. As well as an additional thing to be aware of
The variables are
1. The first is simple enough. It is your solidworks version.
2 "fVirt" is flags for modifier keys for the short cut. I.e. ctrl, shift and alt. The flag values can be seen in the Accel link above. Just know to always in include 0x1 and 0x2
In the example it is 0x1f which is all three keys. 0x1 + 0x2 +0x4 (Shift) + 0x8(CTRL) +0x10(ALT) = 1f
3. "key" is a virtual keycode In the example above 0x41 is the "a" key.
4. "cmd" is the command id assigned by solidworks. You can get this in two way. Bind keys and export or use the return value of AddMenuItem5. Remeber to convert to hex though. In the example above AddMenuItem returned 34419 which is equal to 0x8673. I am bit unsure however if this is consistent across version and system, so you should probably to some testing with this
The last thing to be aware of is where it says "31_65" these number are "fVirt" and "key" in decimal. I.e. fVirt = 0x1f = 31 and key = 0x41 = 65. if i instead wanted to bind to ctrl+B , i would set fVirt = 0x1 + 0x2 + 0x4 = 0x7 and key = 0x42 and create the key
[HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2017\Customization\tPlate0\Custom Accelerators\AddArray\7_66]
I hope this helps.