This section describes how to set, unset, use, and echo environment variables. The procedures are different on Windows as compared to Linux.
You can define environment variables on Windows using the set command as described in the sections that follow.
To permanently change environment variables on Windows
When you modify the setenv.bat file, the modifications are used each time you launch the interactive Softimage application, the command-line Softimage application, or the mental ray renderer.
Use the User Tools utility or a text editor to modify the setenv.bat file in the Application\bin subfolder of the directory where Softimage is installed.
For information about the syntax of the set command, see the sections that follow.
For information about specific variables, see Table of Environment Variables.
To temporarily change environment variables on Windows
When you modify environment variables in a command prompt window, the modifications affect that specific window and any programs launched from it.
For example, to open a command prompt with the default Softimage environment already set, choose Programs Autodesk Softimage 2012.SAP Command Prompt from the Windows Start menu.
Modify the environment variables as needed.
For information about the syntax of the set command, see the sections that follow.
For information about specific variables, see Table of Environment Variables.
Start an application in the modified environment.
For example to launch the interactive Softimage program from the command prompt, enter the following:
xsiSetting Environment Variables on Windows
To create or modify an environment variable, use the set command. For example, to set the variable SI_LINKTAB_LOCATION to the value C:\LinktabFolder:
set SI_LINKTAB_LOCATION=C:\LinktabFolderDo not enclose the value in quotes, unless you want the quotes to be part of the value. Note that variable names are not case-sensitive on Windows.
Unsetting Environment Variables on Windows
To unset an environment variable, set it to nothing. For example:
set MYTEMPVAR=Using Environment Variables on Windows
To use the current value of an environment variable in a command, enclose the variable name in percentage signs (%). For example, to add the directory C:\MyDir to the beginning of the search path:
set PATH=C:\MyDir;%PATH%Echoing Environment Variables on Windows
To echo the current value of an environment variable to the command prompt window, you can use the echo command and enclose the variable name in percentage signs. For example, to see the current search path:
echo %PATH%Alternatively, you can use the set command without using the equal sign (=). For example:
set PATHInstead of specifying the full variable name, you can use the set command with the initial characters of the name to echo all variables that begin with that string.
To see the current values of all environment variables, enter the following:
setYou can define environment variables on Linux using setenv and unsetenv as described in the sections that follow.
To permanently change environment variables on Linux
You can change environment variables permanently in the .xsi_2012.SAP file. Make sure that this file is sourced before launching the interactive Softimage application, the command-line Softimage application, or the mental ray renderer. The .xsi_2012.SAP file is located where the Softimage program files are installed (by default /usr/Softimage/Softimage_2012.SAP), but if there is a version in your home directory it will take precedence.
Use the User Tools utility or a text editor to modify the .xsi_2012.SAP file.
For information about the syntax of the setenv and unsetenv commands, see the sections that follow.
For information about specific variables, see Table of Environment Variables.
To temporarily change environment variables on Linux
When you modify environment variables in an xterm or shell window, the modifications affect that specific window and any programs launched from it.
If desired, set the default Softimage environment. For example,
source /usr/Softimage/Softimage_2012.SAP/.xsi_2012.SAPModify the environment variables as needed.
For information about the syntax of the setenv and unsetenv commands, see the sections that follow.
For information about specific variables, see Table of Environment Variables.
Start an application in the modified environment. For example to launch the interactive Softimage program, enter the following:
xsiSetting Environment Variables on Linux
To create or modify an environment variable, use the setenv command. For example, to set the variable SI_LOCATION to the value usr/Softimage/SOFT3D_4.0:
setenv SI_LOCATION "/usr/Softimage/SOFT3D_4.0"Character strings must be enclosed in double quotes. Remember that variable names are case-sensitive on Linux.
Unsetting Environment Variables on Linux
To unset an environment variable, use the unsetenv command. For example:
unsetenv MYTEMPVARUsing Environment Variables on Linux
To use the current value of an environment variable in a command, prefix the variable name with a dollar sign ($). For example, to add the directory ~/MyDir to the beginning of the search path:
setenv PATH "~/MyDir:$PATH"Echoing Environment Variables on Linux
To echo the current value of an environment variable to the shell or xterm window, use the echo command and prefix the variable name with a dollar sign ($). For example, to see the current search path:
echo $PATHTo echo all environment variables, use:
envRunning the Environment Script on Linux
The .xsi_2012.SAP environment script uses the C shell syntax. The C shell is a common command interpreter on Linux.
If you are using a different command interpreter as your default, you can switch to a C shell temporarily to run the environment script. You can also change your default command interpreter permanently.