Starting optiSLang

There are three methods to start optiSLang.

Windows Start Menu

On a Windows system, select Start > Ansys 2024 R2> optiSLang 2024 R2 or Start > Ansys optiSLang 2024 R2.

Command Line with User Interface

You can start optiSLang in a command line with the user interface enabled.

On a Windows system, run the following command:

[installation path]\optislang [additional options]

On a Linux system, run the following command:

[installation path]/optiSLang [additional options]
OptionDescription
Informational Options
--help (-h)Displays an overview of all command line parameters.
--version (-v)Displays optiSLang version information.
--support-infoDisplays support information.
GUI Mode Options
--newCreates a new project.
--new=path/to/project_new.opfCreates a new project in the provided path.
--runRuns the project.
--purgeOpens a dialog box to define the purge filter, perform a test run and execute the purge functionality.
--import-project-properties project properties fileImports a project properties file.
--project-password argUnlocks password protected projects with the provided password.
--project-password-file password file nameUnlocks password protected projects with the provided password file.
Troubleshooting Options
--no-docDisable built-in documentation system.
--sw-renderingForces software rendering.
Placeholder Options
--placeholder-assign

Displays the placeholder assignment dialog box.

Additional Options:

  • --export-values (*.placeholders)—Exports a placeholder values file after assignment

  • --plmxml (*.xml)—Specifies a PLMXML file for placeholder assignment

  • --save—Saves the project with assigned placeholders (default unless the placeholder values file is exported)

  • --save-as (*.opf)—Saves the project with assigned placeholders in a different location

  • --export-values (*.placeholders)—Exports a placeholder values file after assignment

--import-values (*.placeholders)Imports a placeholder values file.
File Registration Options
--file-provider-dialogDisplays the Registered files dialog box.
Common Server Options
--server-password argSubmits the server password. Use when communication with the server requires the request to contain a password entry.
--write-server-info[=arg(=server_info.ini)]

Writes the server information file using the file path specified. If an absolute path is not supplied, it is considered to be relative to the project working directory.

For example:

--write-server-info=server_info.ini

--log-server-eventsDisplays server events in the Message log pane.
--enable-notifications arg

Subscribe to push notifications sent to the listener.

For example:

--enable-notifications LOG_WARNING LOG_ERROR

Available push notifications are:

  • SERVER_UP

  • SERVER_DOWN

  • LOG_INFO

  • LOG_WARNING

  • LOG_ERROR

  • LOG_DEBUG

  • EXECUTION_FINISHED

  • NOTHING_PROCESSED

  • CHECK_FAILED

  • EXEC_FAILED

  • ACTOR_STATE_CHANGED

  • ACTOR_ACTIVE_CHANGED

  • ACTOR_NAME_CHANGED

  • ACTOR_CONTENTS_CHANGED

  • ACTOR_DATA_CHANGED

  • EXECUTION_STARTED

  • NUM_NOTIFICATIONS

--shutdown-on-finished

Shut down when execution is finished.

Local Server Options
--enable-local-server arg

Enables local surveillance on a specified server ID. On Windows, use named pipes and on Unix, use local domain sockets.

For example:

--enable-local-server=123456

--register-local-listener arg

Registers local listener for specified server ID.

For example:

--register-local-listener=123456

--register-multi-local-listeners arg

Registers multiple local listeners for specified server ID.

For example:

--register-multi-local-listeners 123 456 789

--register-local-heartbeat-listeners arg

Registers local heartbeat listeners for specified server ID.

For example:

--register-local-heartbeat-listeners 123 456 789

--local-listener-id arg

Sets a specific unique ID for the local listener.

For example:

--local-listener-id=30249924-fc14-4573-869c-364e88bc7644

Remote Server Options
--enable-tcp-server[=arg(=5310-5399)]

Enables remote surveillance (plain TCP/IP based), the port indication is optional [5310-5399].

For example:

--enable-tcp-server=5555 or --enable-tcp-server=5300-5700

--enable-ssl-server[=arg(=5310-5399)]

Enables remote surveillance (SSL/TLS encrypted TCP/IP), the port indication is optional [5310-5399].

For example:

--enable-ssl-server=5555 or --enable-ssl-server=5300-5700

--enable-sv[=arg(=5310-5399)]

Enables remote surveillance (ZeroMQ based), the port indication is optional [5310-5399].

For example:

--enable-sv=5555 or --enable-sv=5300-5700

--server-address arg

Sets the remote surveillance server address. If not specified, the server listens on all interfaces.

For example:

--server-address=127.0.0.1

--register-tcp-listener arg

Registers the remote listener (plain TCP/IP based) for specified host and port.

For example:

-register-tcp-listener=127.0.0.1:5310

--register-ssl-listener arg

Registers the remote listener (SSL/TLS encrypted TCP/IP) for specified host and port.

For example:

--register-ssl-listener=127.0.0.1:5310

--register-multi-tcp-listeners arg

Registers multiple remote listeners (plain TCP/IP based) for specified host and port.

For example:

--register-multi-tcp-listeners 127.0.0.1:5310 123.123.123.123:5310

--register-multi-ssl-listeners arg

Registers multiple remote listeners (SSL/TLS encrypted TCP/IP) for specified host and port.

For example:

--register-multi-ssl-listeners 127.0.0.1:5310 123.123.123.123:5310

--register-tcp-heartbeat-listeners arg

Registers remote heartbeat listeners (plain TCP/IP based) for specified host and port.

For example:

--register-tcp-heartbeat-listeners 127.0.0.1:5310 123.123.123.123:5310

--register-ssl-heartbeat-listeners arg

Registers remote heartbeat listeners (SSL/TLS encrypted TCP/IP) for specified host and port.

For example:

--register-ssl-heartbeat-listeners 127.0.0.1:5310 123.123.123.123:5310

--tcp-listener-id arg

Sets a specific unique ID for the TCP listener.

For example:

--tcp-listener-id=d2ab72dd-0d46-488a-a a05-0ddc19794c60

--ssl-listener-id arg

Sets a specific unique ID for the SSL listener.

For example:

--ssl-listener-id=a7c3f31d-81ba-4ec5-b 65b-cce8dd0d609e

Remote Discovery Options
--enable-sv-discovery[=arg(=224.1.2.3:49690-49799)]

Enables network discovery for ZeroMQ based remote surveillance.

For example:

--enable-sv-discovery=224.1.2.3:49690-49799

--enable-tcp-discovery[=arg(=224.1.2.3:49690-49799)]

Enables network discovery for plain TCP/IP based remote surveillance.

For example:

--enable-tcp-discovery=224.1.2.3:49690-49799

--enable-ssl-discovery[=arg(=224.1.2.3:49690-49799)]

Enables network discovery for SSL based remote surveillance.

For example:

--enable-ssl-discovery=224.1.2.3:49690-49799

Batch Mode

You can start optiSLang and execute a workflow without opening the user interface. To start batch mode on either Windows or Linux, run the following command:

optislang -b [additional options] project files

Note:  If you use this command to run the optislang.exe file, the program is executed in a separate terminal that closes automatically when finished.


If you run just the optislang -b part of the command, a list of all command parameters is displayed.

OptionDescription
Informational Options
--help (-h)Displays an overview of all command line parameters.
--version (-v)Displays optiSLang version information.
--support-infoDisplays support information.
Mode of Operation Options
--runRuns the specified projects (default).

Note:  You can also open and run a project by using optislang -b path/to/project.opf.

--no-runDoes not run the specified projects.
--check-onlyChecks if the specified project can be executed, but do not run it.
--export-dotCreates a dotty file (my_project.dot).
--purgePurges the project using purge settings specified in the project.
--purge-defaultPurges the project using default purge settings.
--purge-file (filter file)Purges the project using the filter provided by the filter file.
--export-purge-filter (filter file)Exports the project's purge settings to a filter file.
--encrypt-python-extension Encrypts the provided Python file as a new .pye file while preserving the original file. When a directory is provided, each Python file found in the directory structure below is encrypted by creating a .pye file accordingly. The .pye files can be used in Python import statements like regular .py file based modules.
Batch Mode Options
--new=path/to/project_new.opfCreates a new project in the provided path.
--forceForces projects to be processed, even if they are incomplete (can be used for damaged projects).
--restoreRestores the project from the last save point (if present).
--resetResets projects before running them.
--export-project-properties (project properties file)Exports a project properties file.
--import-project-properties (project properties file)Imports a project properties file.
--output-file (output file)Writes project run results to an output file.
--dump-project-state[=arg(=project_state.json)]Dumps full project state when execution finished.
--include-non-scalar-valuesIncludes non-scalar (result) values in project dump.
--include-algorithm-infoIncludes algorithm information in project dump.
--save-mode arg

Overrides the save mode of working directory contents. Valid arguments are:

  • external: Keep in working directory (default)

  • embedded: Store in project file

--use-project-dir-as-working-dirUses directory containing the project file as working directory.
--project-password argUnlocks password protected projects with the provided password.
--project-password-file password file nameUnlocks password protected projects with the provided password file.
--no-saveDo not save the specified projects after all other actions have been completed.
Script Options
--python (-p) path/to/script.py

Runs a Python script before processing each project.

Scripts running in the Python pane behave identically in batch mode. The batch mode workflow for each project is:

  1. Create a project (using --new) or open a project.

  2. Execute all listed scripts.

  3. Run the system or workflow.

  4. Save the project.

Note:
  • Use --no-run to prevent a project from running.

  • Use --script-arg or --script-args to pass arguments to the script.

Example:

optislang -b --new PyExample.opf --python examples/python/console/arsm_ten_bar_truss.py

This command creates a new project, executes the arsm_ten_bar_truss.py script, and runs the system.

--script-arg argPasses an argument to the Python script.
--script-args "arg1 arg2 arg3 ..."Passes multiple arguments to the Python script (separated by spaces).
Placeholder Options
--import-values (*.placeholders) Imports a placeholder values file.
--export-values (*.placeholders)Exports a placeholder values file after assignment.
--autorelocate[=path/to/filesource] Automatically relocates external file paths (the external file source is optional, the default is the project base directory).
File Registration Options
--file-provider actionPerforms an action for all registered files. Valid actions are ReceiveAll and SendAll.
--file-provider-export (*.csv)Exports a file containing definitions for all registered files.
Postprocessing Options
--start-monitoringStarts optiSLang monitoring.
--command-script [-s] scriptSets the monitoring command script.
--monitoring-mode [-m] arg

Sets the monitoring mode. Valid arguments are:

  • 0: Auto-detect the mode from the monitoring database file (default)

  • 1: Statistics monitoring

  • 2: Reliability monitoring

  • 3: Optimization monitoring

  • 4: Approximation monitoring

--template-file [-t] template fileSets the monitoring template file.
--text-import-settings-file argSets the settings file used for importing text files.
--text-import-interactiveOpens up the Text Import wizard when using text-import-settings-file.
--export-omdb-path argDirectly create an *.omdb file at the provided path.
--connect-local=ID

Connects to the local server at the specified server ID.

For example:

--connect-local=123456

--connect-tcp[=arg(=127.0.0.1:5310)]

Connects to a remote server (plain TCP/IP).

For example:

--connect-tcp=127.0.0.1:5310

--connect-ssl[=arg(=127.0.0.1:5310)]

Connects to a remote server (SSL/TLS encrypted TCP/IP).

For example:

--connect-ssl=127.0.0.1:5310

--connect-zeromq[=arg(=127.0.0.1:5310)]

Connects to a remote server (ZeroMQ based).

For example:

--connect-zeromq=127.0.0.1:5310

--system-name nameSets the name of the system to monitor.
--system-state-hid IDSets the state ID of the system to monitor.
Common Server Options
--server-password argSubmits the server password. Use when communication with the server requires the request to contain a password entry.
--write-server-info[=arg(=server_info.ini)]

Writes the server information file using the file path specified. If an absolute path is not supplied, it is considered to be relative to the project working directory.

For example:

--write-server-info=server_info.ini

--log-server-eventsDisplays server events in the Message log pane.
--enable-notifications arg

Subscribe to push notifications sent to the listener.

For example:

--enable-notifications LOG_WARNING LOG_ERROR

Available push notifications are:

  • SERVER_UP

  • SERVER_DOWN

  • LOG_INFO

  • LOG_WARNING

  • LOG_ERROR

  • LOG_DEBUG

  • EXECUTION_FINISHED

  • NOTHING_PROCESSED

  • CHECK_FAILED

  • EXEC_FAILED

  • ACTOR_STATE_CHANGED

  • ACTOR_ACTIVE_CHANGED

  • ACTOR_NAME_CHANGED

  • ACTOR_CONTENTS_CHANGED

  • ACTOR_DATA_CHANGED

  • EXECUTION_STARTED

  • NUM_NOTIFICATIONS

--shutdown-on-finished

Shut down when execution is finished.

Local Server Options
--enable-local-server arg

Enables local surveillance on a specified server ID. On Windows, use named pipes and on Unix, use local domain sockets.

For example:

--enable-local-server=123456

--register-local-listener arg

Registers local listener for specified server ID.

For example:

--register-local-listener=123456

--register-multi-local-listeners arg

Registers multiple local listeners for specified server ID.

For example:

--register-multi-local-listeners 123 456 789

--register-local-heartbeat-listeners arg

Registers local heartbeat listeners for specified server ID.

For example:

--register-local-heartbeat-listeners 123 456 789

--local-listener-id arg

Sets a specific unique ID for the local listener.

For example:

--local-listener-id=30249924-fc14-4573-869c-364e88bc7644

Remote Server Options
--enable-tcp-server[=arg(=5310-5399)]

Enables remote surveillance (plain TCP/IP based), the port indication is optional [5310-5399].

For example:

--enable-tcp-server=5555 or --enable-tcp-server=5300-5700

--enable-ssl-server[=arg(=5310-5399)]

Enables remote surveillance (SSL/TLS encrypted TCP/IP), the port indication is optional [5310-5399].

For example:

--enable-ssl-server=5555 or --enable-ssl-server=5300-5700

--enable-sv[=arg(=5310-5399)]

Enables remote surveillance (ZeroMQ based), the port indication is optional [5310-5399].

For example:

--enable-sv=5555 or --enable-sv=5300-5700

--server-address arg

Sets the remote surveillance server address. If not specified, the server listens on all interfaces.

For example:

--server-address=127.0.0.1

--register-tcp-listener arg

Registers the remote listener (plain TCP/IP based) for specified host and port.

For example:

-register-tcp-listener=127.0.0.1:5310

--register-ssl-listener arg

Registers the remote listener (SSL/TLS encrypted TCP/IP) for specified host and port.

For example:

--register-ssl-listener=127.0.0.1:5310

--register-multi-tcp-listeners arg

Registers multiple remote listeners (plain TCP/IP based) for specified host and port.

For example:

--register-multi-tcp-listeners 127.0.0.1:5310 123.123.123.123:5310

--register-multi-ssl-listeners arg

Registers multiple remote listeners (SSL/TLS encrypted TCP/IP) for specified host and port.

For example:

--register-multi-ssl-listeners 127.0.0.1:5310 123.123.123.123:5310

--register-tcp-heartbeat-listeners arg

Registers remote heartbeat listeners (plain TCP/IP based) for specified host and port.

For example:

--register-tcp-heartbeat-listeners 127.0.0.1:5310 123.123.123.123:5310

--register-ssl-heartbeat-listeners arg

Registers remote heartbeat listeners (SSL/TLS encrypted TCP/IP) for specified host and port.

For example:

--register-ssl-heartbeat-listeners 127.0.0.1:5310 123.123.123.123:5310

--tcp-listener-id arg

Sets a specific unique ID for the TCP listener.

For example:

--tcp-listener-id=d2ab72dd-0d46-488a-a a05-0ddc19794c60

--ssl-listener-id arg

Sets a specific unique ID for the SSL listener.

For example:

--ssl-listener-id=a7c3f31d-81ba-4ec5-b 65b-cce8dd0d609e

Remote Discovery Options
--enable-sv-discovery[=arg(=224.1.2.3:49690-49799)]

Enables network discovery for ZeroMQ based remote surveillance.

For example:

--enable-sv-discovery=224.1.2.3:49690-49799

--enable-tcp-discovery[=arg(=224.1.2.3:49690-49799)]

Enables network discovery for plain TCP/IP based remote surveillance.

For example:

--enable-tcp-discovery=224.1.2.3:49690-49799

--enable-ssl-discovery[=arg(=224.1.2.3:49690-49799)]

Enables network discovery for SSL based remote surveillance.

For example:

--enable-ssl-discovery=224.1.2.3:49690-49799

Example Commands

Example 1: Run an Existing Project

optislang -b ~/Documents/project.opf

Example 2: Create a New Project

optislang -b --new ~/Documents/projectNew.opf

Example 3: Create and Run a New Project then Run the Existing Project

optislang -b --new ~/Documents/projectNew.opf ~/Documents/project.opf

Example 4: Run an Existing Project, Create a New Project, then Run Another Existing Project

optislang -b ~/Documents/project1.opf --new ~/Documents/project2.opf ~/Documents/project3.opf