This guide demonstrates how to combine Creo mapkeys with Windows OS scripts (Batch/CMD) to create advanced, system-aware automations. Understanding the OS Script Mapkey Syntax
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later.
: Surround your script path with double quotes if it contains spaces. You can also use system variables (e.g., or custom ones like ) if they are defined in your environment. Batch File Behavior
In newer versions of Creo (like Creo 11), mapkeys are often stored in mapkeys.pro in \\%appdata%\\PTC\\ProENGINEER\\Wildfire\\.wf settings\\ .
: It saves you from manual navigation through deep folder structures every time you need to check a drawing or spec. Example 3: Nested Automation (The "Frankenstein" Example)
If you want to tailor this automation to your specific workflow, tell me: What are you trying to automate? What operating system do you use? Share public link
Let's create a mapkey that automatically backs up your current Creo session files to a specific network or local folder using a Windows Batch script. Step 1: Write the Windows Batch Script
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.
and automatically moving/renaming them to a project folder.
mapkey cfg @MAPKEY_NAMELoad Config;@MAPKEY_LABELLoad Config;\ @SYSTEMcopy C:\CAD_Configs\standard_config.pro $CREO_WORKING_DIR\config.pro;
' Copy current date and time into Notepad file Dim dateTime dateTime = Now() Dim fsoFile Set fsoFile = fso.OpenTextFile(desktopPath & "\project_notes.txt", 8, True) fsoFile.WriteLine dateTime fsoFile.Close
To run an operating system command or a script file (like .bat , .vbs , or .exe ), you use the @SYSTEM prefix within your mapkey definition.
When you write or record an Operating System script inside Creo's Mapkey dialog box, the system translates your code into a command prefixed by @SYSTEM inside your local config.pro file.
:: Copy the PDF (assuming Creo saved it as PDF in source folder) copy "%source_path%%source_name%.pdf" "%target_folder%%source_name%_%curdate%.pdf"
Master PTC Creo Mapkeys with OS Scripts: A Complete Guide often requires going beyond simple button-click recordings. To truly streamline your workflow—like automatically renaming files, moving data to specific folders, or triggering external Python scripts—you need to leverage the power of OS Scripts within Mapkeys .