Go to the top menu, click , then Open (or just use a basic command to ensure it records a step). Click Stop on the recording dialog box. Step 3: Edit the Mapkey to run the Script
: Tells Creo to send the following text to the Operating System. ; : Ends the mapkey sequence. Example 1: Open the Current Working Directory creo mapkey os script example
!MK_RECT_EXTRUDE !OS=1 !Select Top plane SELECT(3,FEATURE,TOP) !Create Sketch MENU_ACTIVATE(ModelEdit) MENU_COMMAND(NewSketch) !Sketch: create rectangle by corner points SKETCH_CREATE_RECTANGLE( X1=-10, Y1=-5, X2=10, Y2=5 ) !Finish sketch MENU_COMMAND(Accept) !Extrude MENU_ACTIVATE(Geometry) MENU_COMMAND(Extrude) SET_EXTRUDE_DEPTH(5) MENU_COMMAND(Accept) !Save MENU_COMMAND(Save) Go to the top menu, click , then
@echo off REM Creates a standardized timestamped backup directory SET current_date=%date:~10,4%-%date:~4,2%-%date:~7,2% MKDIR "C:\Creo_Backups\Backup_%current_date%" exit Use code with caution. ; : Ends the mapkey sequence
Click the button in the new dialog to see the text definition. Replace the recorded actions with the following structure: mapkey of @SYSTEMC:\\path\\to\\your\\script\\open_dir.bat; Use code with caution.