Thursday, December 10, 2009

Revit API: More on the KeyboardShortcuts in Subscription pack

In the new Revit 2010 Subscription Advantage Pack, as previously mentioned, there is a new menu for setting up keyboard shortcuts.

Our office is rolling out this pack and have been fiddling with this menu to try and get our standard setup working on the new system. There are a number of things that have popped up that I thought were worth mentioning.

First is that you can now create a keyboard shortcut to a Custom Add-Ins Ribbon menu! Previously in the old text file you could not do this, so you had to have a keyboard shortcut to an external command in the External Tools menu.

However, on the flipside, now it seems that creating shortcuts to the commands in the External Tools menu is not going to work very well if you are sharing your configuration with others. By that I mean, if you setup a standard keyboard shortcuts file, and send it out across your office for others to import (see my previous post on this) then creating shortcuts to external tools will not work very well.

The reason being is I believe the new system records your shortcut as being “Press this key, to go to the 3rd menu item down in the External Tools drop down on the Add-Ins Tab” whereas previously the text file said “Press this key, to go to the menu item with the name COMMAND_NAME in the external tools drop down on the add-ins tab”

The difference to note is that it appears to rely on the ordering of items in the menu. This is fine for all other menus in Revit but not the external tools menu, as each user may have installed different tools at different times and thus have different listing of tools in that menu.

The workaround for this for developers, is that you have to create a ribbon menu for your tools and keyboard shortcut to that – as you are then in control of the ordering.

This is a pretty isolated situation, but if you are like me – creating API add-ins that all Revit users will install, and having a standard keyboard shortcut for these tools, it’s an important issue.

No comments: