RockyApiApplication#

class ansys.rocky.app.rocky_api_application.RockyApiApplication#

Bases: ansys.rocky.app.api_application.ApiApplication

Overview#

CreateProject

Creates a new project.

GetProject

Overrides Kraken API implementation to use the base class.

OpenProject

Closes the current project, if any, and opens the project with the given filename.

CloseProject

Close the current project.

SaveProject

Save the currently opened project.

PlaybackMacroFile

PlaybackMacro

GetAdditionalFeatures

Get the PrePost Scripting wrapper that corresponds to the “Additional Features” page on the application’s Preferences

GetVersion

Return the current version of the application.

GetStudy

Get the project’s Study.

Import detail#

from ansys.rocky.app.rocky_api_application import RockyApiApplication

Attribute detail#

RockyApiApplication.TYPE_3D_WINDOW: str#
RockyApiApplication.TYPE_TIME_PLOT_WINDOW: str#
RockyApiApplication.TYPE_CROSS_PLOT_WINDOW: str#
RockyApiApplication.TYPE_HISTOGRAM_PLOT_WINDOW: str#
RockyApiApplication.TYPE_SPACE_PLOT_WINDOW: str#
RockyApiApplication.TYPE_MULTI_TIME_PLOT_WINDOW: str#

Method detail#

RockyApiApplication.CreateProject() ansys.rocky.app.ra_project.RAProject#

Creates a new project.

RockyApiApplication.GetProject() ansys.rocky.app.ra_project.RAProject#

Overrides Kraken API implementation to use the base class. If there is no project don’t create a new one.

RockyApiApplication.OpenProject(filename: str) ansys.rocky.app.ra_project.RAProject#

Closes the current project, if any, and opens the project with the given filename.

Parameters:

filename (str)

The complete path of the project to be opened. :rtype RAProject:

RockyApiApplication.CloseProject(check_save_state: bool = True) None#

Close the current project.

Parameters:

check_save_state (bool) – If False, it will close without asking the user to save it first.

RockyApiApplication.SaveProject(filename: str | None = None) None#

Save the currently opened project.

Parameters:

filename (str) – The name of the file to save the project or None if to update the current file

RockyApiApplication.PlaybackMacroFile(filename: str) None#
RockyApiApplication.PlaybackMacro(macro_name: str) None#
RockyApiApplication.GetAdditionalFeatures() ansys.rocky.app.ra_additional_features.RAAdditionalFeatures#

Get the PrePost Scripting wrapper that corresponds to the “Additional Features” page on the application’s Preferences

Return type:

RAAdditionalFeatures

RockyApiApplication.GetVersion() str#

Return the current version of the application.

RockyApiApplication.GetStudy(study_name: str | None = None) ansys.rocky.app.ra_study.RAStudy#

Get the project’s Study.

Parameters:

study_name – The name of the study If None is given the first model will be returned