STKDesktop#
- class ansys.stk.core.stkdesktop.STKDesktop#
object
Create, initialize, and manage STK Desktop application instances.
Overview#
Create a new STK Desktop application instance. Specify visible = True to show the application window. Specify user_control = True to return the application to the userβs control. (the application remains open) after terminating the Python API connection. Specify grpc_server = True to attach to STK Desktop Application running the gRPC server at grpc_host:grpc_port. grpc_host is the IP address or DNS name of the gRPC server. grpc_port is the integral port number that the gRPC server is using (valid values are integers from 0 to 65535). grpc_timeout_sec specifies the time allocated to wait for a grpc connection (seconds). grpc_max_message_size is the maximum size in bytes that the gRPC client can receive. Set to zero to use the gRPC default. Only available on Windows. |
|
Attach to an existing STK Desktop instance. Specify the Process ID (PID) in case multiple processes are open. Specify grpc_server = True to attach to STK Desktop Application running the gRPC server at grpc_host:grpc_port. grpc_host is the IP address or DNS name of the gRPC server. grpc_port is the integral port number that the gRPC server is using. grpc_timeout_sec specifies the time allocated to wait for a grpc connection (seconds). grpc_max_message_size is the maximum size in bytes that the gRPC client can receive. Set to zero to use the gRPC default. Only available on Windows. |
|
Release all handles from Python to STK Desktop applications. Not applicable to gRPC connections. |
|
Return a ThreadMarshaller instance capable of marshalling the stk_object argument to a new thread. Not applicable to gRPC connections. |
Import detail#
from ansys.stk.core.stkdesktop import STKDesktop
Method detail#
- STKDesktop.start_application(visible: bool = False, user_control: bool = False, grpc_server: bool = False, grpc_host: str = localhost, grpc_port: int = 40704, grpc_timeout_sec: int = 60, grpc_max_message_size: int = 0) STKDesktopApplication #
Create a new STK Desktop application instance.
Specify visible = True to show the application window. Specify user_control = True to return the application to the userβs control. (the application remains open) after terminating the Python API connection. Specify grpc_server = True to attach to STK Desktop Application running the gRPC server at grpc_host:grpc_port. grpc_host is the IP address or DNS name of the gRPC server. grpc_port is the integral port number that the gRPC server is using (valid values are integers from 0 to 65535). grpc_timeout_sec specifies the time allocated to wait for a grpc connection (seconds). grpc_max_message_size is the maximum size in bytes that the gRPC client can receive. Set to zero to use the gRPC default. Only available on Windows.
- STKDesktop.attach_to_application(pid: int = None, grpc_server: bool = False, grpc_host: str = localhost, grpc_port: int = 40704, grpc_timeout_sec: int = 60, grpc_max_message_size: int = 0) STKDesktopApplication #
Attach to an existing STK Desktop instance.
Specify the Process ID (PID) in case multiple processes are open. Specify grpc_server = True to attach to STK Desktop Application running the gRPC server at grpc_host:grpc_port. grpc_host is the IP address or DNS name of the gRPC server. grpc_port is the integral port number that the gRPC server is using. grpc_timeout_sec specifies the time allocated to wait for a grpc connection (seconds). grpc_max_message_size is the maximum size in bytes that the gRPC client can receive. Set to zero to use the gRPC default. Only available on Windows.
- STKDesktop.release_all() None #
Release all handles from Python to STK Desktop applications.
Not applicable to gRPC connections.
- Returns:
- STKDesktop.create_thread_marshaller(stk_object) ThreadMarshaller #
Return a ThreadMarshaller instance capable of marshalling the stk_object argument to a new thread.
Not applicable to gRPC connections.
- Returns:
ThreadMarshaller