Wizards

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:

wizard_system_nameString containing the name of the Parametric System
create_in_parametric_systemIndicates that the flow should be generated in the named system
type_of_scriptType of script node to use ["batch", "bash", "Python", "perl"]
projectThe current optiSLang project
environmentPyOSDesignPoint containing optiSLang variables
* OSL_CUSTOM_SCRIPT_DIR - contains the absolute path of the current script file
* OSL_DESIGN_NO - representing the current numerical design number (for example, 1)
* OSL_DESIGN_NAME - representing the current design directory name (for example, Design_0001)
* OSL_DESIGN_DIR - contains the absolute path of the current design directory
* OSL_PROJECT_DIR - contains the absolute path of the current project (*.opd)
* OSL_NODE_NAME - contains the name of the current node
* OSL_RLS_VER - representing the version number of optiSLang
* OSL_RLS_REV - representing the revision number of optiSLang
* OSL_RLS_FLG - is 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].