Commands are used to perform project actions and to set project settings and actor properties. Like queries, commands must be in JSON format. A request can contain multiple commands. These are executed in the specified order. The general query template is as follows (<> is optional and/or command specific):
{ "projects": [ { "commands": [ { "type": "builtin", "command":
"COMMAND"<, "args": {}><, "actor_uid": ""><, "hid": ""> } ]
<more commands>} ]<, "Password": "foobar"> }
Commands that display a dialog box can specify an optional argument
usage_mode
with one of the following values: [ DEFAULT, BEGINNER,
ADVANCED, EXPERT, WIZARD, WIZARD_IN_OSL_INSIDE_ANSYS, ANSYS_WORKBENCH ]
The following commands are supported:
ADD_CRITERION
Creates criterion for the system. The request must consist of actor_uid as well as the args entry, containing the argument criterion_type, expression, name , and optionally limit.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"criterion_type":"max", "expression": "Y", "limit": "", "name": "obj2"}, "command": "ADD_CRITERION", "type": "builtin"}]}]}
APPLY_WIZARD
Applies a wizard on a node or system. The request must contain the actor_uid entry as well as the args entry, containing the argument type and optionally the arguments usage_mode, use_existing_system and/or parent_hwnd.
The type argument must be specified by one of the following values: [ solver, sensitivity, optimization, robustness, reevaluation ]. For an empty type, a pre-selection page is offered.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "APPLY_WIZARD", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "type": "sensitivity" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "APPLY_WIZARD", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "type": "sensitivity", "use_existing_system": true, "usage_mode": "EXPERT" } } ] } ] }
AVAILABLE_NODES
Produces lists of available node types, divided into built-in nodes and the different plugin node categories.
{ "What": "AVAILABLE_NODES" }
CLOSE
Closes the current project.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CLOSE" } ] } ] }
CONNECT_NODES
Connects nodes or systems via a connection line. The request needs to contain the args entry, containing the arguments from_actor_uid, from_slot, to_actor_uid and to_slot.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CONNECT_NODES", "args": { "from_actor_uid": "3751b23c-3efb-459e-9b73-49cb4ae77e67", "from_slot": "OMDBPath", "to_actor_uid": "e849f1e9-75b0-4472-8447-d076b33c47bf", "to_slot": "IMDBPath" } } ] } ] }
CREATE_INPUT_SLOT
Creates a new input slot for an actor. The request must contain the actor_uid entry as well as the args entry, containing the argument slot_name and optionally the argument type_hint.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_INPUT_SLOT", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "slot_name": "MyInputSlot" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_INPUT_SLOT", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "slot_name": "MyInputSlot", "type_hint": "DESIGN_TYPE" } } ] } ] }
CREATE_NODE
Creates a new node or system in the project, returning the ID of the created node/system. The request must contain the the args entry containing a mandatory type entry, as well as one or multiple of the following optional entries:
name
parent_uid
design_flow
integration_type
algorithm_type
node_type
mop_node_type
The integration_type, algorithm_type, node_type, and mop_node_type arguments are mutually exclusive and must be used in addition to the type entry when creating plugin nodes of certain categories. In this case, the type entry should contain the corresponding plugin ID. See the following list for accepted argument values:
design_flow: [RECEIVE, SEND, RECEIVE_SEND]
integration_type: [integration_plugin, python_based_integration_plugin]
algorithm_type: [algorithm_plugin, python_based_algorithm_plugin]
node_type: [python_based_node_plugin]
mop_node_type: [python_based_mop_node_plugin]
Examples:
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_NODE", "args": { "type": "Sensitivity", "name": "Sensi-System" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_NODE", "args": { "type": "AnsysWorkbench", "name": "WB-Actor", "parent_uid": "fa743edb-4e0b-4302-b962-f2a32119a110", "design_flow": "RECEIVE_SEND" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_NODE", "args": { "type": "AEDT2", "name": "AEDT node", "parent_uid": "fa743edb-4e0b-4302-b962-f2a32119a110", "integration_type": "python_based_integration_plugin" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_NODE", "args": { "type": "optislang_node", "name": "optiSLang", "parent_uid": "fa743edb-4e0b-4302-b962-f2a32119a110", "integration_type": "integration_plugin" } } ] } ] }
CREATE_OUTPUT_SLOT
Creates a new output slot for an actor. The request must contain the actor_uid entry as well as the args entry, containing the argument slot_name and optionally the argument type_hint.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_OUTPUT_SLOT", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "slot_name": "MyOutputSlot" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_OUTPUT_SLOT", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "slot_name": "MyOutputSlot", "type_hint": "DESIGN_TYPE" } } ] } ] }
CREATE_START_DESIGNS
Creates start designs for the system and evaluates their criteria. The request must contain the actor_uid entry as well as the args entry, containing the property sampling_type and optionally number_of_levels or number_of_samples.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "CREATE_START_DESIGNS", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "sampling_type": "fullfactorial", "number_of_levels": 2 } } ] } ] }
DISCONNECT_NODES
Disconnects nodes or systems removing the connection line. The request needs to contain the args entry, containing the arguments from_actor_uid, from_slot, to_actor_uid, and to_slot.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "DISCONNECT_NODES", "args": { "from_actor_uid": "3751b23c-3efb-459e-9b73-49cb4ae77e67", "from_slot": "OMDBPath", "to_actor_uid": "e849f1e9-75b0-4472-8447-d076b33c47bf", "to_slot": "IMDBPath" } } ] } ] }
DISCONNECT_SLOT
Removes a connection from an actor. The request must contain the actor_uid entry as well as the args entry, containing the arguments slot_name and direction.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "DISCONNECT_SLOT", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "slot_name": "MyInputSlot", "direction": "sdInputs" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "DISCONNECT_SLOT", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "slot_name": "MyOutputSlot", "direction": "sdOutputs" } } ] } ] }
EVALUATE_DESIGN
Sets the reference design in root system, solves it and returns the result. The request must contain the parameters entry.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "EVALUATE_DESIGN", "args": { "parameters": { "X1": 1.0, "X2"; 1.0, "X3": 1.0 } } } ] } ] }
EXPORT_DESIGNS
Extract designs from the system and export it as a *.csv file. The request must contain the actor_uid entry as well as the args entry, containing the argument path and optionally the argument type_hint. "format" and "csv_separator".
{ "projects": [ { "commands": [ { "type": "builtin", "command": "EXPORT_DESIGNS", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "path": "C:/samples_path/result.csv", "format": "csv", "csv_separator": "\t" } } ] } ] }
FINALIZE
Finalize a stopped algorithm system to continue the calculation of further systems.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "FINALIZE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
LINK_REGISTERED_FILE
Connects a registered file to an actor.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "LINK_REGISTERED_FILE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "uid": "d2ab72dd-0d46-488a-aa05-0ddc19794c60" } } ] } ] }
NEW
Create a new project.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "NEW" } ] } ] }
OPEN
Open a new project.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "OPEN", "args": { "path": "C:/samples_path/Project.opf", "do_force": true, "do_restore": false, "do_reset": false } } ] } ] }
PAUSE
Pause project execution.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "PAUSE" } ] } ] }
REEVALUATE_STATE
Requests actor state reevaluation for a specific actor/hid combination. Actor state reevaluation is only processed if supported by the actor.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REEVALUATE_STATE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REEVALUATE_STATE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "hid": "0.1" } ] } ] }
REFRESH_LISTENER_REGISTRATION
Refresh or reset the listener unregister policy timer for a client to prevent the automatic listener un-registration. The request must contain the args entry, containing the property ID.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REFRESH_LISTENER_REGISTRATION", "args": { "uid": "8a79b28a-d79e-4a78-bf22-293f15c02b25" } } ] } ] }
REGISTER_FILE
Adds a file in the central file registry, returning a reference ID.
All arguments are optional and can be, for example, the following values: uid, ident, local_location, action, and so on.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_FILE", "args": { "ident": "File 42", "action": "Send", "local_location": { "split_path": {"head": "", "tail": "C:/samples_path/result.txt" }, "base_path": "", "base_path_mode": "ABSOLUTE_PATH" } } } ] } ] }
REGISTER_LISTENER
Register a client, returning a reference ID.
This command can be used to register clients at the server. As long as any client is registered, optiSLang does not shut down automatically when the project is finished, or when receiving
SHUTDOWN
commands. This can be useful when multiple clients are using an optiSLang instance simultaneously and you need to keep the optiSLang instance alive until the last client quits using it. Registered clients are unregistered automatically when the listener unregister policy timer has expired. To prevent this, the timer can be refreshed periodically by sending a refresh listener command (seeREFRESH_LISTENER_REGISTRATION
).he arguments are either the ID of the local listener or the IP and port of the TCP listener. Optionally, you can specify the listener unregister policy timeout in milliseconds and the desired push-notifications (see
SUBSCRIBE_FOR_PUSH_NOTIFICATIONS
). The default timeout value is 60000 milliseconds.{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_LISTENER", "args": { "id": "123456" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_LISTENER", "args": { "id": "123456", "timeout": 30000 } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_LISTENER", "args": { "host": "127.0.0.1", "port": 5330 } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_LISTENER", "args": { "host": "127.0.0.1", "port": 5330, "timeout": 30000 } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_LISTENER", "args": { "host": "127.0.0.1", "port": 5330, "timeout": 30000, "notifications": ["LOG_ERROR", "LOG_WARNING"] } } ] } ] }
REGISTER_LOCATION_AS_INPUT_SLOT
Registers a certain (input) location as a input slot. The request must consist of actor_uid as well as the args entry, containing the mandatory argument location, and optional arguments name and reference_value. The format of the location entry depends on the (integration) actor type.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"location": {}, "name": "my_name", "reference_value": 42.0}, "command": "REGISTER_LOCATION_AS_INPUT_SLOT", "type": "builtin"}]}]}
REGISTER_LOCATION_AS_INTERNAL_VARIABLE
Registers a certain (output) location as an internal variable. The request must consist of actor_uid as well as the args entry, containing the mandatory argument location, and optional arguments name and reference_value. The format of the location entry depends on the (integration) actor type.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"location": {}, "name": "my_name", "reference_value": 42.0}, "command": "REGISTER_LOCATION_AS_INTERNAL_VARIABLE", "type": "builtin"}]}]}
REGISTER_LOCATION_AS_OUTPUT_SLOT
Registers a certain (output) location as a output slot. The request must consist of actor_uid as well as the args entry, containing the mandatory argument location, and optional arguments name and reference_value. The format of the location entry depends on the (integration) actor type.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"location": {}, "name": "my_name", "reference_value": 42.0}, "command": "REGISTER_LOCATION_AS_OUTPUT_SLOT", "type": "builtin"}]}]}
REGISTER_LOCATION_AS_PARAMETER
Registers a certain (input) location as a parameter. The request must consist of actor_uid as well as the args entry, containing the mandatory argument location, and optional arguments name and reference_value. The format of the location entry depends on the (integration) actor type.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"location": {}, "name": "my_name", "reference_value": 42.0}, "command": "REGISTER_LOCATION_AS_PARAMETER", "type": "builtin"}]}]}
REGISTER_LOCATIONS_AS_PARAMETER
Initial registration of all input locations as parameters. The request must contain the actor_uid entry.
Currently only supported for plugins.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_LOCATIONS_AS_PARAMETER", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
REGISTER_LOCATION_AS_RESPONSE
Registers a certain (output) location as a response. The request must consist of actor_uid as well as the args entry, containing the mandatory argument location, and optional arguments name and reference_value. The format of the location entry depends on the (integration) actor type.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"location": {}, "name": "my_name", "reference_value": 42.0}, "command": "REGISTER_LOCATION_AS_RESPONSE", "type": "builtin"}]}]}
REGISTER_LOCATIONS_AS_RESPONSE
Initial registration of all output locations as responses. The request must contain the actor_uid entry.
Currently only supported for plugins.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REGISTER_LOCATIONS_AS_RESPONSE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
REMOVE_CRITERIA
Removes all criteria from the system. The request must consist of actor_uid.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "command": "REMOVE_CRITERIA", "type": "builtin"}]}]}
REMOVE_CRITERION
Removes existing criterion from the system. The request must consist of actor_uid as well as the args entry, containing the argument name of the criterion to be removed.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"name": "obj2"}, "command": "REMOVE_CRITERION", "type": "builtin"}]}]}
REMOVE_NODE
Removes an existing node or system in the project. The request must contain the actor_uid entry.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "REMOVE_NODE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
REMOVE_PARAMETER
Removes the parameter from registered parameters at the actor.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"name": "my_name"}, "command": "REMOVE_PARAMETER", "type": "builtin"}]}]}
REMOVE_RESPONSE
Removes the response from registered responses at the actor.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"name": "my_name"}, "command": "REMOVE_RESPONSE", "type": "builtin"}]}]}
RE_REGISTER_LOCATIONS_AS_PARAMETER
Adjust all input locations with the already registered parameters. The request must contain the actor_uid entry.
Currently only supported for plugins.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RE_REGISTER_LOCATIONS_AS_PARAMETER", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
RE_REGISTER_LOCATIONS_AS_RESPONSE
Adjust all output locations with the already registered responses. The request must contain the actor_uid entry.
Currently only supported for plugins.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RE_REGISTER_LOCATIONS_AS_RESPONSE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
RESET
Reset complete project or a specific actor state. For a complete project reset, do not specify the actor_uid and hid entries.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RESET" } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RESET", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "hid": "0.1" } ] } ] }
RESTART
Restart project that has already been run.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RESTART" } ] } ] }
RESUME
Resume project execution from paused state.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RESUME" } ] } ] }
RUN_PYTHON_SCRIPT
Loads a Python script in a project context and executes it. The request must contain the args entry, containing the argument script and optionally the argument args as array for script arguments.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RUN_PYTHON_SCRIPT", "args": { "script": "C:/samples_path/script.py" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RUN_PYTHON_SCRIPT", "args": { "script": "C:/samples_path/script.py", "args": [ "Sensi", "True" ] } } ] } ] }
RUN_REGISTERED_FILES_ACTIONS
Performs actions for all or a specific registered file.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RUN_REGISTERED_FILES_ACTIONS" } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "RUN_REGISTERED_FILES_ACTIONS", "args": { "uid": "d2ab72dd-0d46-488a-aa05-0ddc19794c60" } } ] } ] }
SAVE
Save the changed data and settings of the current project.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SAVE" } ] } ] }
SAVE_AS
Save and open the current project at a new location.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SAVE_AS", "args": { "path": "C:/samples_path/Project.opf", "do_force": true, "do_restore": false, "do_reset": false } } ] } ] }
SAVE_COPY
Save the current project as a copy to a location.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SAVE_COPY", "args": { "path": "C:/samples_path/Project.opf" } } ] } ] }
SET_ACTOR_PROPERTY
Change an actor property. The request must contain the actor_uid entry as well as the args entry, containing the property name and the value.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_ACTOR_PROPERTY", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "name": "MaxParallel", "value": "32" } } ] } ] }
SET_ACTOR_SETTING
Change an actor setting. The request must contain the actor_uid entry as well as the args entry, containing the property name and the value.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_ACTOR_SETTING", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "name": "maximum_designs_to_validate", "value": "5" } } ] } ] }
SET_ACTOR_STATE_PROPERTY
Change an actor state property. The request must contain the actor_uid entry as well as the args entry, containing the property name and the value.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_ACTOR_STATE_PROPERTY", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "name": "stop_after_execution", "value": "true" } } ] } ] }
SET_CRITERION_PROPERTY
Sets the properties of existing criterion for the system. The request must consist of actor_uid as well as the args entry, containing the argument criterion_name, name, and value of the property to be changed.
{"projects": [{"commands": [{"actor_uid": "8d6a661e-a8d3-4177-b69b-e0d7c87f8e28", "args": {"criterion_name": "obj2", "name": "type", "value": "min"}, "command": "SET_CRITERION_PROPERTY", "type": "builtin"}]}]}
SET_PLACEHOLDER_VALUE
Change a placeholder. The request must contain the args entry, containing the placeholder name and the value.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_PLACEHOLDER_VALUE", "args": { "name": "model_name", "value": "model1" } } ] } ] }
SET_PROJECT_SETTING
Change a project setting. The request must contain the args entry, containing the setting name and the value.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_PROJECT_SETTING", "args": { "name": "number_of_message_queue_threads", "value": "64" } } ] } ] }
SET_REGISTERED_FILE_VALUE
Changes a property of a registered file. The request must contain the args entry, containing the UID and a property with name and value.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_REGISTERED_FILE_VALUE", "args": { "uid": "d2ab72dd-0d46-488a-aa05-0ddc19794c60", "name": "embedded", "value": "true" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_REGISTERED_FILE_VALUE", "args": { "uid": "d2ab72dd-0d46-488a-aa05-0ddc19794c60", "name": "local_location", "value": { "split_path": {"head": "", "tail": "C:/samples_path/result.txt" }, "base_path": "", "base_path_mode": "ABSOLUTE_PATH" } } } ] } ] }
SET_START_DESIGNS
Sets the start designs of the system and evaluates their criteria. The request must contain the actor_uid entry as well as the args entry, containing the property start_designs.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_START_DESIGNS", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "start_designs": "[{"id": 1,...}]" } } ] } ] }
An example of the JSON structure of start designs:
[ { "id": 1, "run_state": "done", "parameters": { "header": 0, "sequence": [ { "First": "X1", "Second": 3.14 }, { "First": "X2", "Second": -3.14 } ] }, "responses": { "header": 0, "sequence": [ { "First": "Y", "Second": -11.60 } ] }, "criteria": { "header": 0, "sequence": [ { "First": "obj_Y", "Second": { "lhs": "", "rhs": "Y", "type": "min" } } ] } } ]
SET_SUCCEEDED_STATE
Sets an actor execution state for a specific HID to succeed.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_SUCCEEDED_STATE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SET_SUCCEEDED_STATE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "hid": "0.1" } ] } ] }
SHOW_DIALOG
Shows a project or application dialog box. The request must contain the args entry with the argument type. You can also specify the following optional arguments: usage_mode and/or parent_hwnd. The type argument must be specified by one of the following values:
Application dialogs: [ about, help, settings, plugin ]
Project dialogs: [ project_settings, project_overview, license_management, registered_files, purge, load_from, save_to ]
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SHOW_DIALOG", "args": { "type": "help" } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SHOW_DIALOG", "args": { "type": "project_settings" } } ] } ] }
SHOW_NODE_DIALOG
Shows a node or system specific dialog box. By default, this is the edit dialog box. The request must contain the actor_uid entry. In addition, the following optional arguments can be specified using the args entry: blocking, type, usage_mode, and/or parent_hwnd.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SHOW_NODE_DIALOG", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95" } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SHOW_NODE_DIALOG", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "blocking": true } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SHOW_NODE_DIALOG", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "type": "help" } } ] } ] }
SHUTDOWN
Stop listening for incoming connections, discard pending requests, and shut down the server. Batch mode exclusive: Continue project run until execution finished. Terminate optiSLang.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SHUTDOWN" } ] } ] }
SHUTDOWN_WHEN_FINISHED
Batch mode exclusive: Continue project run until execution finished. Stop listening for incoming connections, discard pending requests, shutdown the server. Terminate optiSLang.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SHUTDOWN_WHEN_FINISHED" } ] } ] }
START
Start project execution.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "START" } ] } ] }
STOP
Stop project execution.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "STOP" } ] } ] }
STOP_GENTLY
Stop project execution after the current design is finished.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "STOP_GENTLY" } ] } ] }
SUBSCRIBE_FOR_PUSH_NOTIFICATIONS
Subscribe to push notifications sent to the client. The request must contain the args entry, containing the property UID and notifications with an array of the following values or the value ALL to subscribe to all messages.
Server: [ SERVER_UP, SERVER_DOWN ] (always be sent by default).
Logging: [ LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG ].
Project: [ EXECUTION_FINISHED, NOTHING_PROCESSED, CHECK_FAILED, EXEC_FAILED ].
Nodes: [ ACTOR_STATE_CHANGED, ACTOR_ACTIVE_CHANGED, ACTOR_NAME_CHANGED, ACTOR_CONTENTS_CHANGED, ACTOR_DATA_CHANGED ].
You can also specify a node_types filter as an array to restrict the notifications to these types.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SUBSCRIBE_FOR_PUSH_NOTIFICATIONS", "args": { "uid": "8a79b28a-d79e-4a78-bf22-293f15c02b25", "notifications": ["ALL"] } } ] } ] }
{ "projects": [ { "commands": [ { "type": "builtin", "command": "SUBSCRIBE_FOR_PUSH_NOTIFICATIONS", "args": { "uid": "8a79b28a-d79e-4a78-bf22-293f15c02b25", "notifications": ["ALL"], "node_types": ["Sensitivity", "AnsysWorkbench"] } } ] } ] }
UNLINK_REGISTERED_FILE
Disconnects a registered file from an actor.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "UNLINK_REGISTERED_FILE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "uid": "d2ab72dd-0d46-488a-aa05-0ddc19794c60" } } ] } ] }
UNREGISTER_FILE
Removes a file from the central file registry. The request must contain the args entry, containing the property UID.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "UNREGISTER_FILE", "args": { "uid": "d2ab72dd-0d46-488a-aa05-0ddc19794c60" } } ] } ] }
UNREGISTER_LISTENER
Unregister a client. The request must contain the args entry, containing the property ID.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "UNREGISTER_LISTENER", "args": { "uid": "8a79b28a-d79e-4a78-bf22-293f15c02b25" } } ] } ] }
WRITE_MONITORING_DATABASE
Writes the simulation results from the system to a monitoring database file (*.omdb). The request must contain the actor_uid entry. In addition, the following optional arguments can be specified using the args entry: path and/or hid.
{ "projects": [ { "commands": [ { "type": "builtin", "command": "WRITE_MONITORING_DATABASE", "actor_uid": "5cdfb20b-bef6-4412-9985-89f5ded5ee95", "args": { "path": "C:/samples_path/result.omdb", "hid": "0.1" } } ] } ] }