control#

abstractmethod ProxySolverNode.control(command: str, hid: str | None = None, wait_for_completion: bool = False, timeout: float | int = 100, run_async: bool = False) → bool | str | List[str]#

Control the node state.

Parameters:
command: str

Command to execute. Options are "start", "restart", "stop_gently", "stop", and "reset".

hid: Optional[str], optional

Hid entry. The default is None.

wait_for_completion: bool, optional

Whether to wait for completion. The default is False.

Deprecated since version 1.1.0: This argument is ignored and will be removed in future versions. Waiting for command completion is currently not supported.

timeout: Union[float, int], optional

Time limit for monitoring the status of the command. The default is 100 s.

Deprecated since version 1.1.0: This argument is ignored and will be removed in future versions. Waiting for command completion is currently not supported.

run_async: bool, optional

Whether to execute the command as an asynchronous, non-blocking long running operation. If True, this method returns immediately with the IDs of the long running operations (one per hid) instead of waiting for completion. Only supported for the "reset" command. By default False.

Note

Argument is supported for Ansys optiSLang version >= 27.1 only.

Returns:
Union[bool, str, List[str]]

True when successful, False when failed. If run_async is True, the long running operation ID(s) are returned instead (a list with one ID per hid for regular nodes, or a single ID for the root system).