Skip to main content

optiSLang interfaces and customizations 2026 R1

Wizards

Last update: 25.06.2026

optiSLang allows you to extend the solver wizard by using common script interfaces or by enabling automatic support of Python-based integration nodes in the configuration.

To use custom script wizards, the scripts must fulfill the naming conventions *_cw.py or *_solverwizard.py and must be placed in one of the following locations:

  • [installation path]/scripting/wizards
  • Directories specified by SC_AlternativeCWDirectories configuration settings.
  • Directories specified by the environment variable OSL_ALT_CW_SEARCH_DIRS, separated by the native environment separator (; on Windows platforms or : on Linux platforms).

Custom script wizards found in any of these locations are loaded when the application starts and are then available for use within optiSLang.

Optionally, the following file types with the same filename and in the same directory can be used as:

  • Node icon (.svg, .jpg, .png, .jpeg, .ico, .bmp)
  • Documentation page in the help system (.html)

The following variables are predefined in the script:

Variable/Parameter Description
wizard_system_name String containing the name of the Parametric System
create_in_parametric_system Indicates that the flow should be generated in the named system
type_of_script Type of script node to use ("batch", "bash", "Python", "perl")
project The current optiSLang project
environment PyOSDesignPoint containing optiSLang variables
- OSL_CUSTOM_SCRIPT_DIR - Absolute path of the current script file
- OSL_DESIGN_NO - Current numerical design number (e.g., 1)
- OSL_DESIGN_NAME - Current design directory name (e.g., Design_0001)
- OSL_DESIGN_DIR - Absolute path of the current design directory
- OSL_PROJECT_WORKING_DIR - Absolute path of the current project (*.opd).
- OSL_PROJECT_FILE_DIR - Absolute path of the current directory containing the project file (*.opf).
- OSL_PROJECT_DIR - Absolute path of the current project (*.opd). Deprecated.
- OSL_NODE_NAME - Name of the current node
-OSL_RLS_VER - Version number of optiSLang
- OSL_RLS_REV - Revision number of optiSLang
- OSL_RLS_FLG - Empty unless a specific version of optiSLang is used

Note: The selected project file can also be passed to the script by the second command line argument sys.argv[1].

Connect with Ansys