Skip to content

Instantly share code, notes, and snippets.

@bastian2001
Last active March 7, 2024 14:43
Show Gist options
  • Save bastian2001/2be6067300f8d89f636d438be3a01433 to your computer and use it in GitHub Desktop.
Save bastian2001/2be6067300f8d89f636d438be3a01433 to your computer and use it in GitHub Desktop.
AutoDesignator for Altium Designer
^!d::{
if WinActive("ahk_exe x2.exe") {
Sleep 500
Send "t"
Sleep 50
Send "a"
Sleep 50
Send "a"
Sleep 300
Send "{Shift down}{Tab}{Shift up}"
Sleep 50
Send "{Shift down}{Tab}{Shift up}"
Sleep 50
Send "{Shift down}{Tab}{Shift up}"
Sleep 50
Send "{Shift down}{Tab}{Shift up}"
Sleep 50
Send "{Enter}"
Sleep 300
Send "{Enter}"
Sleep 50
Send "{Tab}"
Sleep 50
Send "{Tab}"
Sleep 50
Send "{Tab}"
Sleep 50
Send "{Enter}"
Sleep 300
Send "{Tab}"
Sleep 50
Send "{Tab}"
Sleep 50
Send "{Tab}"
Sleep 50
Send "{Enter}"
Sleep 50
Send "{Enter}"
Sleep 50
Send "{Tab}"
Sleep 50
Send "{Enter}"
}
}

AutoHotKey script that automatically assigns designators to all components with a ? in the designator, like R?, C?.

Since scripting in Altium is a pain, this is an autohotkey script. Sleep times can be adjusted to match your PC's speed requirements. While in a schematics sheet, press Ctrl + Alt + D to run this script. It will go to the tools section, press annotate schematics, create an ECO, accept it and close everything in about one second. I found myself using this pattern a lot of times repetitively, so I felt like it could be automated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment