RAModule#

class ansys.rocky.app.ra_addins.RAModule(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem, ElementWithAddins

Rocky PrePost Scripting wrapper for an individual module in a project, below the “Modules” item. Retrieve individual module from the RAModuleCollection via:

module_collection = study.GetModuleCollection()
module = module_collection.GetModule('Module Name')

Overview#

EnableModule

Enable the module.

DisableModule

Disable the module.

SetModuleEnabled

Enable or disable the module.

IsModuleEnabled

Check if the module is enabled.

GetName

Get the element’s name.

SetName

Modules cannot have its name set.

GetOutputObject

Get the API object that represents this module’s unique simulation results, if it exists.

Import detail#

from ansys.rocky.app.ra_addins import RAModule

Method detail#

classmethod RAModule.GetWrappedClass()#
classmethod RAModule.GetClassName()#
RAModule.EnableModule() None#

Enable the module.

RAModule.DisableModule() None#

Disable the module.

RAModule.SetModuleEnabled(enabled) None#

Enable or disable the module.

Parameters:

enabled (bool) – Whether the module should be enabled (True) or disabled (False).

RAModule.IsModuleEnabled()#

Check if the module is enabled.

Return type:

bool

RAModule.GetName()#

Get the element’s name.

Return type:

unicode

Returns:

The name of the element in the application

RAModule.SetName(name) None#

Modules cannot have its name set.

Parameters:

name – str The name of the process

Raises:

RockyApiError – Modules do not support changing its name.

RAModule.GetOutputObject() ansys.rocky.app.ra_addin_process.RAModuleOutput | None#

Get the API object that represents this module’s unique simulation results, if it exists.

Note that only modules that declare that they generate “unique” results (as opposed to new properties/curves on existing items) will have an output object.