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.

GetAllModuleProperties

Get a dictionary of all module properties values.

Import detail#

from ansys.rocky.app.ra_addins import RAModule

Method detail#

classmethod RAModule.GetWrappedClass() → type#
classmethod RAModule.GetClassName() → str#
RAModule.EnableModule() → None#

Enable the module.

RAModule.DisableModule() → None#

Disable the module.

RAModule.SetModuleEnabled(enabled: bool) → None#

Enable or disable the module.

Parameters:

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

RAModule.IsModuleEnabled() → bool#

Check if the module is enabled.

Return type:

bool

RAModule.GetName() → str#

Get the element’s name.

Return type:

unicode

Returns:

The name of the element in the application

RAModule.SetName(name: str) → 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.

RAModule.GetAllModuleProperties() → dict[str, Any]#

Get a dictionary of all module properties values.

Return type:

dict(str, Any)

Returns:

A dictionary with defined spec properties (‘model’, ‘geometries’, ‘particle_input’, …) as keys. For the entities keys, the value is another dictionary with the entity name or a tuple of names as keys and their module properties as values. For scalar properties, the returned value will be a tuple of (value, unit).