To run a script in batch mode, you must set the environment and then start Autodesk Softimage with the script.
Launching Autodesk Softimage with a Script
To run the program and a script in batch mode, start Autodesk Softimage with the -script switch, specifying your script file name. There are several ways to do this, depending on whether you need to specify the scripting language, specify the procedure to run, or supply values for arguments.
To run simple scripts in batch mode
To run a simple VBScript file named myscript.vbs, use the following syntax at the command prompt:
xsi -script myscript.vbs
To specify the scripting language in batch mode
The scripting language is determined by the file name extension according to information in the registry: by default, this is .vbs for VBScript, .js for JScript, .pls for PerlScript, and .pys for Python. If your script file uses a different extension, you can specify the language explicitly with the -lang switch. For example, to run a script file named myscript.xxx, use one of the commands below:
xsi -script myscript.xxx -lang VBScript xsi -script myscript.xxx -lang JScript xsi -script myscript.xxx -lang PerlScript xsi -script myscript.xxx -lang Python
To specify a procedure in batch mode
By default, when you run a script in batch mode, only global code is executed. If your script contains procedures, you can use the -main switch to specify which procedure to run. For example, to run a procedure named myproc in a VBScript file named myscript.vbs, use the following syntax:
xsi -script myscript.vbs -main myproc
To supply arguments in batch mode
If your procedure requires arguments, you can specify them after the -args switch. For example, if the procedure myproc in myscript.vbs requires two arguments named myargname1 and myargname2, you can run the procedure and set the argument values with the following syntax (it should all be on one line):
xsi -script myscript.vbs -main myproc -args -myargname1 myargvalue1 -myargname2 myargvalue2