Analysis Situs is not necessarily an interactive tool. We have designed it in a way to be also used as an SDK and batch processing application. You might prefer using the batch mode for running your fully automated CAD processing workflows. The batch mode, by definition, assumes that there is no user interaction to happen to get the job done. However, there is also a CLI (Command Line Interface) thing that can be used for batch processing and is, in fact, designed for that. In this chapter, we cover all means that Analysis Situs exposes for batch processing and similar scenarios.
Run single script
You can run Analysis Situs without GUI to execute a Tcl script.
Make sure to use forward slashes in the path to your script. To redirect output to a file use the following syntax:
In this mode, the Tcl standard channels are not overridden, so all messages and errors will be printed to the standard output.
The Command Line Interface of Analysis Situs provides you with a traditional terminal-like experience, where you are prompted for a single command at a time.
To run CLI, launch the asiExeCli executable. There are several things to keep in mind about CLI:
- The CLI terminal allows you to run all the same commands that are accessible from UI. However, those commands that require UI widgets will do nothing.
- The standard output is redirected to the terminal window, so you will see the application messages right in the console.
To run UDP server, launch the asiExeServer executable. Any external application could connect to the specific port as a UDP client and send datagrams for execution. The server is ready once the "socket is ready" message is printed to the standard output.
The following animation shows a C#-written client communicating by UDP with Analysis Situs Server which is implicitly launched by this client (thanks to Alexis for providing this tool).
This UDP-based headless communication allows for batch processing not limited to a single machine. Here is an example on how to run the CLI server: