I am looking for two ways to execute commands from within Creo.
The first way is to have a .bat file run while config .pro is loading. There are functions we care trying to turn off so they are not visible within Creo. We have a command that runs but files need to be put in certain directories for it to work. I have a .bat file that places everything correctly and executes the command. I am looking for a way to load the file as the config.pro is taking affect.
The other thing I want to do is to execute design calculators we have built from an icon on the main ribbon. the button would launch an .exe file.
You can edit the startup script for Creo Parametric (normally parametic.bat) to include the call of your .bat file before the line for starting parametric.exe. I don't believe there is a way to determine when the config.pro file is being read into Creo Parametric while it is starting up.
For your calculators, create a mapkey similar to the following editing the path to your calculator program:
mapkey calc @MAPKEY_NAMEStart the calculators;\ mapkey(continued) @MAPKEY_LABELOpen the calculators;\ mapkey(continued) @SYSTEMstart \/min \ mapkey(continued) C:\\PTC\\tools\\bin\\calculators.exe;
The mapkey above will open a DOS/CMD window, start your calculator program, close the DOS/CMD window, and return to Creo Parametric.