Automatically copying a standard company configuration file from a central server to your local working directory before loading it into your session. Data Exporting:
mapkey bkp @MAPKEY_NAMEBackup Script;@MAPKEY_LABELRun Backup Batch File;\ @SYSTEMstart /min C:\\scripts\\backup_model.bat; Use code with caution. Copied to clipboard Components of the OS Script Mapkey To Define a Mapkey - PTC Support Portal creo mapkey os script example
prefix in a mapkey definition, you can automate tasks that go beyond CAD modeling, such as file management, launching external apps, or running custom scripts. PTC Community Core Example: Executing a Batch File To run an OS script, the mapkey must use the command followed by the path to your executable or script. PTC Community Mapkey Syntax (in config.pro mapkey os_run @SYSTEM C:\scripts\my_script.bat; Detailed Feature Review Description Automation Scope PTC Community Core Example: Executing a Batch File
) rather than a temporary working folder to ensure the mapkey works in every session. Hidden Execution Why use OS Scripts
Save your changes to your configuration file to keep the mapkey for future sessions. Why use OS Scripts? Automation:
! Activate model (assume part) ACTION(occt:Model) ! Create datum plane selection: TOP SELECTION(component,type=model) SELECTION(plane,name,TOP) ! Create sketch on Top COMMAND(Planar Sketch) ! Wait for sketch environment PAUSE(0.2)