Sending ScriptControl Commands to CM via the Command Window (cmd)
Question
I want to send some ScriptControl commands to CarMaker through CMD. How can I do that?
Solution
In order to send ScriptControl commands via cmd to CarMaker, a TCP command server must be first stablished. The TCP command server provides remote command execution through a TCP network socket.
To start the TCP command server, start the CarMaker GUI in the Windows command window with the comman line option -cmdport
Figure 1.
The CM Gui will be opened after this.
Now open a new Windows command window, and execute telnet.
Once inside Windows Telnet, type set localecho. Otherwise you won’t see what you are writing.
Then connect to the CarMaker GUI with open localhost 16660.
A message „Trying to connect to localhost…“ will appear and nothing else will happen but you are already connected. From now on you can write any ScriptControl command that you want to send to CM. The first command that you send will be written on top of your Telnet window (Figure 2) and once executed, the window will be refreshed and show the result (if applicable) of your command (Figure 3).
Figure 2.
Figure 3.
Hint: if you want to check whether you are already connected or not, please run the telnet command on MSYS, as there is an output message once you are connected.
There are other ways to start the TCP command server. Please refer to the Programmer’s Guide, chapter Remote GUI Control.
- Date: 04.09.2020
- Product: CarMaker
- Version: 9.0
- Component: TCP/UDP
- Language: English
Tags
cmdTCP
ScriptControl
tcl