UiApplication#
- class ansys.stk.core.uiapplication.UiApplication#
Bases:
IUiApplicationPartnerAccess
A root object of the Application Model.
Overview#
Load a personality by its name. |
|
Activates the applicationโs main window. |
|
Brings up a common File Open dialog and returns the file name selected by the user. If the user canceled, returns an empty file name. |
|
Only works from local HTML pages and scripts. |
|
Brings up a common File SaveAs dialog and returns the file name selected by the user. If the user canceled, returns an empty file name. |
|
Shuts down the application. |
|
Brings up a standard File Open Dialog and returns an object representing the selected file. |
|
Brings up the Directory Picker Dialog and returns a selected directory name. |
|
Specify the current log file to be written to. |
|
Log the Message specified. |
|
Create a new instance of the application model root object. |
Return a reference to the currently loaded personality. |
|
Get or set whether the main window is visible. |
|
Get or set whether the application is user controlled. |
|
Return a collection of windows. |
|
Get or set a height of the main window. |
|
Get or set a width of the main window. |
|
Get or set a vertical coordinate of the main window. |
|
Get or set a horizontal coordinate of the main window. |
|
Get or set the state of the main window. |
|
Return a collection most recently used files. |
|
Return the complete path to the application, excluding the final separator and name of the application. Read-only String. |
|
Return an HWND handle associated with the application main window. |
|
Get or set message-pending delay for server busy dialog (in milliseconds). |
|
Return an new instance of the root object of the STK Object Model. |
|
Get the current log files full path. |
|
Set to true to display certain alerts and messages. Otherwise false. The default value is True. |
|
Get process id for the current instance. |
Examples#
Close the STK desktop application
# AgUiApplication uiApplication: STK Application
uiApplication.shutdown()
Import detail#
from ansys.stk.core.uiapplication import UiApplication
Property detail#
- property UiApplication.windows: IWindowsCollection#
Return a collection of windows.
- property UiApplication.window_state: ApplicationWindowState#
Get or set the state of the main window.
- property UiApplication.most_recently_used_list: MostRecentlyUsedCollection#
Return a collection most recently used files.
- property UiApplication.path: str#
Return the complete path to the application, excluding the final separator and name of the application. Read-only String.
- property UiApplication.hwnd: int#
Return an HWND handle associated with the application main window.
- property UiApplication.message_pending_delay: int#
Get or set message-pending delay for server busy dialog (in milliseconds).
- property UiApplication.personality2: Any#
Return an new instance of the root object of the STK Object Model.
Method detail#
- UiApplication.file_open_dialog(self, default_ext: str, filter: str, initial_dir: str) str #
Brings up a common File Open dialog and returns the file name selected by the user. If the user canceled, returns an empty file name.
- UiApplication.create_object(self, prog_id: str, remote_server: str) Any #
Only works from local HTML pages and scripts.
- UiApplication.file_save_as_dialog(self, default_ext: str, filter: str, initial_dir: str) str #
Brings up a common File SaveAs dialog and returns the file name selected by the user. If the user canceled, returns an empty file name.
- UiApplication.file_open_dialog_extension(self, allow_multi_select: bool, default_ext: str, filter: str, initial_dir: str) UiFileOpenDialogExtension #
Brings up a standard File Open Dialog and returns an object representing the selected file.
- UiApplication.directory_picker_dialog(self, title: str, initial_dir: str) str #
Brings up the Directory Picker Dialog and returns a selected directory name.
- UiApplication.open_log_file(self, log_file_name: str, log_file_mode: ApplicationOpenLogFileMode) bool #
Specify the current log file to be written to.
- UiApplication.log_message(self, msg_type: ApplicationLogMessageType, msg: str) None #
Log the Message specified.
- UiApplication.create_application(self) UiApplication #
Create a new instance of the application model root object.
- Returns:
UiApplication