make external API command available in list of commands available to be a keyboard shortcut

make external API command available in list of commands available to be a keyboard shortcut

james.levieux
Advocate Advocate
313 Views
4 Replies
Message 1 of 5

make external API command available in list of commands available to be a keyboard shortcut

james.levieux
Advocate
Advocate

I've made a few commands that work well from the ribbon which I've been using for years.  Lately, I've added a command that I want to be available as a shortcut.  I was surprised to find that every other addin in the addin tab was listed in the addins tab and all of mine were not!  What do I need to do to join the club?

jameslevieux_0-1739467625184.png

 

0 Likes
Accepted solutions (1)
314 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

You can create a shortcut for a built-in command; here are some articles on that by The Building Coder:

 

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

james.levieux
Advocate
Advocate

Thank you for the response Jeremy.  Just to clarify, is this what the developers are doing, editing the contents of the KeyboardShortcuts.txt file so that their shortcut appears on the list within the keyboard shortcut editor?  I thought there was some OnStartup ribbon function that I was missing.

0 Likes
Message 4 of 5

ricaun
Advisor
Advisor
Accepted solution

@james.levieux wrote:

Thank you for the response Jeremy.  Just to clarify, is this what the developers are doing, editing the contents of the KeyboardShortcuts.txt file so that their shortcut appears on the list within the keyboard shortcut editor?  I thought there was some OnStartup ribbon function that I was missing.


If your addin is registering the RibbonPanel and Buttons in the IExternalApplication.OnStartup, the commands should appear in the keyboard shortcut by default. No extra steps are required.

Just register using Ribbon Panels and Controls should work by default.

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 5 of 5

james.levieux
Advocate
Advocate

Thank you for that confirmation Luiz.  That led me to look more closely at my startup method and found that I had a licensing scheme was interfering with the process and was able to fix the problem.  Many thanks!

0 Likes