STKRuntimeApplication#

class ansys.stk.core.stkruntime.STKRuntimeApplication#

STKXApplication

Interact with STK Runtime.

Use STKRuntime.StartApplication() or STKRuntime.AttachToApplication() to obtain an initialized STKRuntimeApplication object.

Overview#

new_object_root

May be used to obtain an Object Model Root from a running STK Engine application.

new_object_model_context

May be used to obtain an Object Model Context from a running STK Engine application.

set_grpc_options

Set advanced-usage options for the gRPC client.

Available options include: { “collection iteration batch size” : int }. Number of items to preload while iterating through a collection object. Default is 100. Use 0 to indicate no limit (load entire collection). { “disable batching” : bool }. Disable all batching operations. { “release batch size” : int }. Number of interfaces to be garbage collected before sending the entire batch to STK to be released. Default value is 12.

new_grpc_call_batcher

Construct a GrpcCallBatcher linked to this gRPC client that may be used to improve API performance.

max_batch is the maximum number of calls to batch together. Set disable_batching=True to disable batching operations for this batcher. See grpcutilities module for more information.

shutdown

Shut down the STKRuntime application.

Import detail#

from ansys.stk.core.stkruntime import STKRuntimeApplication

Method detail#

STKRuntimeApplication.new_object_root(self) STKObjectRoot#

May be used to obtain an Object Model Root from a running STK Engine application.

Returns:

STKObjectRoot

STKRuntimeApplication.new_object_model_context(self) STKObjectModelContext#

May be used to obtain an Object Model Context from a running STK Engine application.

Returns:

STKObjectModelContext

STKRuntimeApplication.set_grpc_options(self, options: dict) None#

Set advanced-usage options for the gRPC client.

Available options include: { “collection iteration batch size” : int }. Number of items to preload while iterating through a collection object. Default is 100. Use 0 to indicate no limit (load entire collection). { “disable batching” : bool }. Disable all batching operations. { “release batch size” : int }. Number of interfaces to be garbage collected before sending the entire batch to STK to be released. Default value is 12.

Parameters:

options : dict

Returns:

None

STKRuntimeApplication.new_grpc_call_batcher(self, max_batch: int = None, disable_batching: bool = False) GrpcCallBatcher#

Construct a GrpcCallBatcher linked to this gRPC client that may be used to improve API performance.

max_batch is the maximum number of calls to batch together. Set disable_batching=True to disable batching operations for this batcher. See grpcutilities module for more information.

Parameters:

max_batch : int

disable_batching : bool

Returns:

GrpcCallBatcher

STKRuntimeApplication.shutdown(self) None#

Shut down the STKRuntime application.

Returns:

None