Using Dynamo to Execute Keyboard Shortucts

Hi all,

Quick question regarding dynamo. Can I use dynamo to execute a keyboard shortcut?

I need to automate a process that requires a Revit add-in. I’ve assigned a keyboard shortcut to the required command within Revit. The command works within Revit perfectly well. I just need to use the command 1,200 times for this task, instead of my usual 3-5.

Thanks in advance.

Dynamo has no built in nodes for this, and I am not aware of any packages that contain it. However, with a python node, it should be possible as there are libraries for it. Try googling a guide on how to use python to control keyboard inputs, there should be a lot of tutorials around.

1 Like

Thanks Kenny. I was in a pretty big time crunch last week and just used an autoclicker to execute the revit command alongside my script. Now I can check out how to do this with python!

While you can call native windows handlers for key presses from within Dynamo, that would not have helped you, because while Dynamo is executing (which is also a Revit plugin), no other plugins would be able to work.

1 Like