
Creo bridges these two environments using the @SYSTEM command within the mapkey syntax. This command tells Creo to pause its internal macro recorder, open an OS command line window, execute the specified external command, and then return control back to Creo. Step-by-Step Architecture of an OS Mapkey
: Click New and define your shortcut name (e.g., os ). creo mapkey os script example
β Your OS script should exit /b 0 (success) or 1 (failure). Creo Mapkeys cannot catch errors directly, but you can write a wrapper script that logs errors. Creo bridges these two environments using the @SYSTEM
mapkey shortcut @MAPKEY_LABEL;@SYSTEM command_or_script_path; Use code with caution. Key Execution Rules β Your OS script should exit /b 0 (success) or 1 (failure)
OS script (paste as the Mapkey's command text):
If your script takes a long time to run and you do not need to wait for its output, use the Windows start command to run it in the background: @SYSTEM start /B C:\\cad_scripts\\long_task.bat; . This hands control back to Creo instantly.