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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

sys window run batch file?

davehaigh
11-Garnet

sys window run batch file?

Is there any way, when you open a system window, to tell it to run a batch file.

I'd like to create a mapkey that opens a system window which calls a batch file to examine a file and tell the user what start models were used to create it.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions
psobejko
12-Amethyst
(To:davehaigh)

I think that you can accomplish this by using the @SYSTEM keyword in your mapkey definition:

mapkey mbf @MAPKEY_LABELRun MY_BATCH_FILE (mbf);\

@SYSTEMstart c:\\MY_MAPKEYS\\MY_BATCH_FILE.bat;

MY_BATCH_FILE.bat should probably end with "exit" in order to close the window after it is done...

Pro/TIP: note how the actual string to be typed to trigger the mapkey (mbf) was included in the MAPKEY_LABEL - this makes it easy to "recall" what the mapkey is later on by using the "Command Search" box in the Creo ribbon.

In above, searching for "batch" will bring up a list which will have an entry "Run MY_BATCH_FILE (mbf)".

View solution in original post

1 REPLY 1
psobejko
12-Amethyst
(To:davehaigh)

I think that you can accomplish this by using the @SYSTEM keyword in your mapkey definition:

mapkey mbf @MAPKEY_LABELRun MY_BATCH_FILE (mbf);\

@SYSTEMstart c:\\MY_MAPKEYS\\MY_BATCH_FILE.bat;

MY_BATCH_FILE.bat should probably end with "exit" in order to close the window after it is done...

Pro/TIP: note how the actual string to be typed to trigger the mapkey (mbf) was included in the MAPKEY_LABEL - this makes it easy to "recall" what the mapkey is later on by using the "Command Search" box in the Creo ribbon.

In above, searching for "batch" will bring up a list which will have an entry "Run MY_BATCH_FILE (mbf)".

Top Tags