Hexagon Save Script
How It Works
When triggered, the script:
- Activates the target Hexagon Smart 3D window.
- Opens File > Exit using the keyboard shortcuts
Alt+F, thenX. - Presses
Alt+Yto select Yes when prompted to save the current work. - Waits for the Save As dialog box to appear.
- Generates an autosave filename using the process ID and the current timestamp.
- Enters the generated filename in the Save As dialog box.
- Saves the file to the specified directory.
- Waits for the Save As dialog box to close.
- Allows Hexagon Smart 3D* to continue its normal exit process.
Generated File Name
Saved files use the following format:
autosave_<PID>_<YYYYMMDDTHHMMSS>
| Component | Description |
|---|---|
autosave | Indicates that the file was generated automatically. |
PID | Process ID (PID) of the Hexagon application. |
YYYYMMDDTHHMMSS | Date and time the project was saved. |
Hexagon Autosave File
For example:
autosave_1234_20260629T142210
The date and time saved in this example is 2026-06-29 14:22:10.
Save Location
The script saves the file in the following order of precedence:
-
The configured save folder, if specified.
-
Otherwise, the Windows temporary directory:
C:\Users\<username>\AppData\Local\Temp
Example Configuration
Example: Hexagon Save Script Custom Actions
BEGIN custom_actions
-------------------------------------------------------------------------------
title = Hexagon Save Script
command = %bin%AutoHotKey.exe
args ="%bin%ahk\Hexagon-save-script.ahk" %pid% "%root%Log\temp\Freeze\" | more
condition=exe=*smart3d.exe*
timeout = P5M
when-to-run = pre
---------------------------------------------------------------------------------