cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Executing commands from config.pro

GLewis4
3-Visitor

Executing commands from config.pro

HI all,

 

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. 

 

does anyone have ideas on how to run these?

1 REPLY 1
dnordin
15-Moonstone
(To:GLewis4)

G Lewis,

 

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.

 

Regards,

 

Dan N.

Top Tags