Skip to main content
1-Visitor
Jun 1, 2016 10:22 AM UTC
Question

Is it possible to run Hamilton C Shell Command in background

Is it possible to run Hamilton C Shell Command in background


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.

10 replies

14-Alexandrite
Jun 1, 2016 12:37 PM UTC

Try adding the following line to your config.pro:

terminal_command <full_path_of_C_Shell_Executable>

Translate
24-Ruby III
Jun 1, 2016 1:15 PM UTC

Hi,

please explain why do you need functionality of Hamilton C Shell.

MH

Translate
manpatil1-VisitorAuthor
1-Visitor
Jun 2, 2016 3:38 AM UTC

I want to convert Commercial creo lab files into Universal Format. While conversion Hamilton C Shell focus for every command.. It blocks the monitor . can't able to do any work simultaneosly on  machine.

I tryied using following commands. It only hides Hamilton C Shell Command prompt

   ShellExecute("csh.exe"," -LBINF",$CShellLoc,"",@SW_HIDE)  . 

Manoj

Translate
24-Ruby III
Jun 2, 2016 4:47 AM UTC

Hi,

please explain what do you get when you convert Commercial creo lab file into Universal Format.

For example:

source file = cube.prt

target file = ???

Note: It looks like you need to convert Creo native files into STEP, IGES or something else using some batch tool...

MH

Translate
14-Alexandrite
Jun 2, 2016 1:17 PM UTC

Now I realize that I didn't read the original question all the way to the end. My bad, please disregard my previous post.

Since you are trying to use "ShellExecute" I guess that you want to open C shell from a toolkit application. In the same time the syntax doesn't look quite right.What API are you using?

Translate
16-Pearl
Jun 2, 2016 1:20 PM UTC

Manoj,

Are you trying to run a conversion program via the "open a system window" command in Creo Parametric where that system window is the Hamilton C shell?  Or are you running the normal system DOS/CMD window from Creo Parametric, and trying to execute an AutoIT script to run the conversion?

When you run a "system" window from Creo Parametric, the shell window must close/exit in order for control to switch back to Creo Parametric.

If you want to launch an external program via the "system" window from Creo Parametric, and still be able to use Creo Parametric while that program is running "in the background", try using the START command in a mapkey for launching the system window.

An example mapkey to start a system window would be:

mapkey run_convert @MAPKEY_NAMEConvert to Universal Format;\
mapkey(continued) @MAPKEY_LABELConvert to Universal Format;\
mapkey(continued) @SYSTEMstart \/min \
mapkey(continued) C:\\ptc\\scripts\\creo\\parametric\\convert_2_uf.exe;

The above mapkey will open a DOS/CMD window, start the convert_2_uf.exe program, and close the DOS/CMD window while the convert program will continue to run.

If you're not using a mapkey, you can still use the START command from the system window, and just close out the original system window once your program starts.

Hopefully I have understood your question.

Regards,

Dan N.

Translate
manpatil1-VisitorAuthor
1-Visitor
Jun 3, 2016 4:46 AM UTC

Hi,

 

I have created AutoIT Script for conversion which launches Hamilton C Shell on Desktop.

For every file Hamilton C Shell Focus on Desktop.

My target is to run the process in Background.cshells.png

Is any option available to run process in Background.

Translate