Tired of browsing through folders? This mapkey opens your current Creo working directory in Windows Explorer instantly.
mapkey shortcut @SYSTEM command_or_path_to_script; Example 1: Launching a Batch File
To execute Operating System (OS) scripts within a Creo mapkey, use the @SYSTEM prefix or the tab in the Mapkeys dialog. Example: Running a Batch File
mapkey $F5 @SYSTEM start .;
REM Log it echo %DATE% %TIME% - Released %PART_NUMBER% Rev %REV% >> \SERVER\LOGS\release.log exit /b 0
This mapkey ( .zip ) compresses all PDF drawings in the current working directory into a single archive file using 7-Zip.
mapkey .pdf @MAPKEY_LABEL Export and Move PDF;\ mapkey(continued) ~ Command `ProCmdExportPDF`;\ mapkey(continued) ~ Command `ProCmdUtilCmdLine` `;`@SYSTEM`C:\Creo_Scripts\move_pdf.bat`; Use code with caution. creo mapkey os script example
If spaces are completely unavoidable, wrap the inner OS paths in escaped double quotes ( \"path with spaces\" ). Environment Variables
For advanced workflows, you may need to export metadata from Creo, process it externally, and notify the user. This mapkey commands Creo to output a Bill of Materials (BOM) text file, and then launches a Python script to parse the data.
: Click New and define your shortcut name (e.g., os ). Tired of browsing through folders
Launch a script to backup a current session or export BOMs to specific network drives.
mapkey bom_export @MAPKEY_NAMEExport BOM to DB;\ ~ Command `ProCmdTblSaveAs` ;\ ~ Select `file_saveas` `type_option` 1 `csv`;\ ~ Path `file_saveas` `FileName_Input_Browse` `C:\temp\bom_temp.csv`;\ ~ Command `ProCmdFileSave` ;\ ~ Command `ProCmdUtilSystem` `system("python C:\creo_scripts\export_bom_to_db.py C:\temp\bom_temp.csv")`;\ ~ Command `ProCmdFileEraseNotDisp` ;