Process is returning immediately when running the IPG CarMaker through the Command line

I have a command line task to run when executed should run a tcl scipt and only return once completed.

cm.exe "${somepath}/carmaker/Data/TestRun/Automation" "$file" -connect -appl 
"$carmaker_backend" -cmd "RunScript Script.tcl"
anotherline #<-- without executing the above line, this is executed. how to make it synchronous?

Is there something which I can do, such that only when the script control Script.tcl is executed next line should be executed?

Hi Vj,

it seems like you missunderstood the concept of Tcl skripting in CarMaker.
There is an embedded Tcl interpreter in the CarMaker GUI which allows you to run scripts (line by line). Calling the GUI as a commandline tool does not do waht you expect.
If you would be willing to switch to Python instead I can recomment the cmapi which comes very close to what you described above. See the Python API User Manual for how to set it up und use it for your needs.