To run a script in batch mode, you must set the environment and then start Autodesk Softimage with the script.
Before running a script in batch mode, you should first set the environment properly:
• On Windows, open a command prompt. To do this, choose Programs > SOFTIMAGE Products > 7.5 > Command Prompt from the Windows Start menu.
• On Linux, open a shell and source the .xsi_7.5 Softimage resource file.
Launching Autodesk Softimage with a Script
To run the program and a script in batch mode, start Autodesk Softimage with the
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
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
xsi -script myscript.vbs -main myproc
![]()
|
Even when a procedure is specified, global code may be executed before the procedure is called. This is a side effect of parsing the script with some scripting engines. To be certain that your script behaves predictably in all situations, do not mix global code and procedures. |
To supply arguments in batch mode
If your procedure requires arguments, you can specify them after the
xsi -script myscript.vbs -main myproc -args -myargname1 myargvalue1 -myargname2 myargvalue2
![]()
|
If you specify arguments with the |
Autodesk Softimage v7.5