STKXApplication#

class ansys.stk.core.stkx.STKXApplication#

STK X Application object.

Overview#

execute_command

Send a connect command to STK X.

get_licensing_report

Do not use this method, as it is deprecated. Returns a formatted string that contains the license names and their states. The string is formatted as an XML document.

set_online_options

Set http proxy online options.

get_online_options

Get http proxy online options.

set_connect_handler

Set callback to handle a certain connect command.

execute_multiple_commands

Execute multiple CONNECT actions. The method throws an exception if any of the specified commands have failed.

is_feature_available

Return true if the specified feature is available.

terminate

Terminates the use of STK Engine. This must be the last call to STK Engine.

use_software_renderer

Configure engine graphics to use a software renderer in order to meet minimum graphics requirements. Enabling this option will result in significant performance impacts.

subscribe

β€œβ€β€Return an ISTKXApplicationEventHandler that is subscribed to handle events associated with this instance of STKXApplication.”””

enable_connect

Enable or disable TCP/IP connect command processing (default: disabled).

connect_port

Specify TCP/IP port to be used by Connect (default: 5001).

host_id

Return the Host ID.

registration_id

Return the Registration ID.

version

Return the version number.

vendor_id

Do not use this property, as it is deprecated. The identifier of the vendor.

log_file_full_name

Return full path and log file name.

logging_mode

Control the log file generation, and if the log file is deleted or not on application exit.

connect_max_connections

Specify the maximum number of Connect connections to allow.

no_graphics

Start engine with or without graphics (default: engine starts with graphics.).

show_sla_if_not_accepted

Show the Software License Agreement dialog if not already accepted.

use_hook

Start engine with or without message hook setup (default: engine starts with message hook setup.).

Import detail#

from ansys.stk.core.stkx import STKXApplication

Property detail#

property STKXApplication.enable_connect: bool#

Enable or disable TCP/IP connect command processing (default: disabled).

property STKXApplication.connect_port: int#

Specify TCP/IP port to be used by Connect (default: 5001).

property STKXApplication.host_id: str#

Return the Host ID.

property STKXApplication.registration_id: str#

Return the Registration ID.

property STKXApplication.version: str#

Return the version number.

property STKXApplication.vendor_id: str#

Do not use this property, as it is deprecated. The identifier of the vendor.

property STKXApplication.log_file_full_name: str#

Return full path and log file name.

property STKXApplication.logging_mode: LoggingMode#

Control the log file generation, and if the log file is deleted or not on application exit.

property STKXApplication.connect_max_connections: int#

Specify the maximum number of Connect connections to allow.

property STKXApplication.no_graphics: bool#

Start engine with or without graphics (default: engine starts with graphics.).

property STKXApplication.show_sla_if_not_accepted: bool#

Show the Software License Agreement dialog if not already accepted.

property STKXApplication.use_hook: None#

Start engine with or without message hook setup (default: engine starts with message hook setup.).

Method detail#

STKXApplication.execute_command(self, command: str) ExecuteCommandResult#

Send a connect command to STK X.

Parameters:

command : str

Returns:

ExecuteCommandResult

STKXApplication.get_licensing_report(self) str#

Do not use this method, as it is deprecated. Returns a formatted string that contains the license names and their states. The string is formatted as an XML document.

Returns:

str

STKXApplication.set_online_options(self, use_proxy: bool, server_name: str, port_num: int, user_name: str, password: str, save_password: bool) bool#

Set http proxy online options.

Parameters:

use_proxy : bool

server_name : str

port_num : int

user_name : str

password : str

save_password : bool

Returns:

bool

STKXApplication.get_online_options(self) Tuple[bool, str, int, str, bool]#

Get http proxy online options.

Returns:

Tuple[bool, str, int, str, bool]

STKXApplication.set_connect_handler(self, command_id: str, prog_id: str) None#

Set callback to handle a certain connect command.

Parameters:

command_id : str

prog_id : str

Returns:

None

STKXApplication.execute_multiple_commands(self, connect_commands: list, action: ExecuteMultipleCommandsMode) ExecuteMultipleCommandsResult#

Execute multiple CONNECT actions. The method throws an exception if any of the specified commands have failed.

Parameters:

connect_commands : list

action : ExecuteMultipleCommandsMode

Returns:

ExecuteMultipleCommandsResult

STKXApplication.is_feature_available(self, feature_code: FeatureCodes) bool#

Return true if the specified feature is available.

Parameters:

feature_code : FeatureCodes

Returns:

bool

STKXApplication.terminate(self) None#

Terminates the use of STK Engine. This must be the last call to STK Engine.

Returns:

None

STKXApplication.use_software_renderer(self) None#

Configure engine graphics to use a software renderer in order to meet minimum graphics requirements. Enabling this option will result in significant performance impacts.

Returns:

None