Wednesday, April 8, 2009

How to create keyboard shortcuts to External Commands in Revit 2010

Seeing we now have the fancy ribbon interface in Revit 2010, the keyboard shortcuts files you have been using are obsolete. There is instructions in the file for how to setup normal shortcuts, however I ran into a problem when trying to point the shortcuts to my external commands.

An example of an line in the keyboard shortcut file is:

"VG"    ribbon:"View-Graphics-Visibility and Appearance"

As you can see, the ribbon item you want to shortcut to is pathed out using - as a separator. This works fine, but what happens when you want to use the “Add-Ins” tab?? (note the –)

The answer is, you use ‘Add_Ins’ instead. See an example here:

"HLWD"   ribbon:"Add_Ins-External Tools-External Tools-HelloWorld"

Also note the two external tools sections, these are because there is an external tools menu on the external tools panel.

Another thing to note is that unfortunately, the problem from Revit 2009 still remains, to create a keyboard shortcut to an API program, it must be an external command in the External Tools menu. You can’t create a keyboard shortcut to your own ribbon panels/menus/buttons. So even if you have created a nice looking ribbon panel for your program, you’re going to have to make an external command (and do the ini editing to register it). If anyone knows a workaround for this, please let me know, but I’d say it’s due to the order in which Revit loads things.

No comments: