Getting the CommandId

Small trick I found out this morning.

When you want to implement postable commands, it can be tricky to find command ID for addins for example.

Simple way to do so, the keyboard shortcut file: %appdata%\Autodesk\Revit\Autodesk Revit 2024\KeyboardShortcuts.xml

And there is also the journal file, but you have to run the command beforehand:

Jrn.RibbonEvent "Execute external command:CustomCtrl_%CustomCtrl_%CustomCtrl_%pyRevit%pyRevit%Espionner%List Elements:pyrevitcore-pyrevit-pyrevit-tools-spy-listelements"

Example for the Search command in pyRevit:

CommandId="CustomCtrl_%CustomCtrl_%pyRevit%pyRevit%Search" Paths="pyRevit>pyRevit"

and if you are looking for System Postable Command IDs

Spy>List Elements