Symbolic Path Names

In this topic:


Some file system path names used by SIMetrix may be defined using a symbolic constant. Such paths are of the form:


Where symbol is the name of the constant and path is any sequence of characters valid for a path name. The actual path is resolved by substituting %symbol% with the value of symbol.

Symbolic paths make it easy to move files to new locations as only the values for their symbols need to be changed in order for SIMetrix to be able to continue to find them.


There are two types of symbolic constant. These are system constants and user constants. System constants are pre-defined while user constants can be arbitrarily defined by the user. There are currently 7 system constants. These are:

STARTPATH Full path of the current working directory from where SIMetrix was launched.
DOCSPATH Full path of the My Documents folder on Windows.
EXEPATH Full path of the location of the SIMetrix binary SIMetrix.exe.
APPDATAPATH Full path of the Application Data directory.
TEMPPATH Path of temporary directory
SXAPPDATAPATH Path of the SIMetrix application data directory. See Application Data Directory for details.
SHAREPATH Path of the root support directory used for various support files used by SIMetrix such as model and symbol libraries.
LIBPATH Path of plugins directory in SIMetrix installation
SXDOCSPATH Path of SIMetrix directory in Windows My Documents
COMMON_APPDATAPATH Path of common application data directory. (Typically C:\ ProgramData)

User constants must be defined in the configuration file. See Configuration Settings for more information. User constants are defined in the [Locations] section of the file. Currently these must be added by hand using a text editor.

The format used is as follows:


Where symbol_definitions is any number lines of the form:


symbolvalue may be any sequence of characters that are valid for a system path name and may contain spaces. There is no need to enclose it in quotation marks even if the value contains spaces. Nested definitions to any level are permitted. That is symbolvalue may also itself use other symbolic constants. Recursive definitions won't raise an error but will not be meaningful.

UNC paths (e.g. \ \ server\ c\ project) may be used for symbolvalue.

Comments may be added to the project file prefixed with a semi-colon.

Configuration File Example

The following shows examples of symbolic path name definitions in the configuration file. Lines such as these may be placed anywhere in the file, but we recommend that they are placed at the end.

; Project file

Using Symbolic Names

Symbolic path constants may be used in the applications listed below. In all cases a mechanism called automatic path matching is used which means that to use symbolic paths, all you need to do is define the values in the project file then carry on working as before. The automatic path matching algorithm attempts to match a user symbol or one of the EXEPATH or DOCSPATH system symbols to a part of the path being processed. If a match is found, the path name will be stored with the symbolic value.

Component paths

If a component is placed using the full path option, the automatic path matching mechanism described above will be invoked. For example suppose the user symbol CELLS has the value C:\ Projects\ Proj1\ Cells and the component with path C:\ Projects\ Proj1\ Cells\ celllib1\ inv.sxsch is placed using the full path method. The actual value of the schematic_path property will become %CELLS%\ celllib1\ inv.sxsch. The matching of C:\ Projects\ Proj1\ Cells to %CELLS% is performed automatically.

Note that automatic path matching will not be invoked for components placed using the relative path method.

Global model library file paths

Model files installed globally can use symbolic paths. The automatic path matching mechanism described above will be invoked when models are installed. So if the model file C:\ SPICELIB\ OnSemi\ *.mod and the symbol MODELLIB has the value C:\ SPICELIB, the model file path will be saved as %MODELLIB%\ OnSemi\ *.mod.

Path option variables

  • StartupDir
  • ScriptDir
  • BiScriptDir
  • TempDataDir
  • PSpiceIniPath
  • DefaultLib
  • SymbolsDir

Automatic path matching is invoked whenever these values are set or modified.

Symbol file locations

Schematic symbol file paths may be stored using symbolic constants. Automatic path matching is invoked whenever a library is installed.

Notes for Windows

The automatic path matching system will correctly match a drive based path (e.g. h:\ projects\ proj1) with its mapped UNC path (e.g. \ \ server1\ c\ projects\ proj1) provided the drive based path points to a network share and not a local drive. For example if the project fie contains the entry:


and \ \ server1\ c is mapped to the H: drive then the file H:\ Projects\ proj1\ cell23.sxcmp will be stored as %Project%\ cell23.sxcmp. However, if you are actually running SIMetrix from the machine server1 and \ \ server1\ c is the share name for the local C: drive then C:\ Projects\ proj1\ cell23.sxcmp will not be recognised as equivalent to %Project%\ cell23.sxcmp. This limitation is due to security restrictions in Windows.