PDA

View Full Version : AutoHotKey for Revit 2010



truevis
2009-05-27, 04:55 PM
It is actually easier (for the most part *) to automate with AHK scripts in 2010 because now more commands are accessible through the keyboard.

E.g., what once was the “Show” button, is now “Highlight in Model” which can be accessed through the keyboard instead of only being clicked on. In 2009, I had to do tricks with AHK finding the button via an image then mouse-clicking on it, now it's just done with Send commands:



Send, {ALTDOWN}
Sleep, 400
Send, PT
Sleep, 300
Send, HM{ALTUP}


* In Revit 2010, Orient to a Plane... has been moved to under Wheelie so that would be a challenge to automate -- before, it was simply in the menus.

david.kingham
2009-05-27, 10:01 PM
Yeah there are some things that are easier, only major thing I had to change was to stop using WinMenuSelectItem which was a bit more reliable than send

winnwgomez
2009-06-28, 04:53 AM
Hi

Can we automate duplication and renaming of views within Revit? Is there any sample .ahk file ?

thanks
winn

truevis
2009-06-29, 11:38 AM
Can we automate duplication and renaming of views within Revit? Is there any sample .ahk file ?
Like most macro creation with AHK, start with the AutoScriptWriter (Recorder) app and do as much as you can with the keyboard.

Operation would probably be: highlight the View name in the project browser and hit the hotkey to start the duplication and renaming.