RAModule#
- class ansys.rocky.app.ra_addins.RAModule(id: str, model_id: str | None = None)#
Bases:
ansys.rocky.app.api_element_item.ApiElementItem,ElementWithAddinsRocky PrePost Scripting wrapper for an individual module in a project, below the “Modules” item. Retrieve individual module from the
RAModuleCollectionvia:module_collection = study.GetModuleCollection() module = module_collection.GetModule('Module Name')
Overview#
Enable the module. |
|
Disable the module. |
|
Enable or disable the module. |
|
Check if the module is enabled. |
|
Get the element’s name. |
|
Modules cannot have its name set. |
|
Get the API object that represents this module’s unique simulation results, if it exists. |
|
Get a dictionary of all module properties values. |
Import detail#
from ansys.rocky.app.ra_addins import RAModule
Method detail#
- RAModule.SetModuleEnabled(enabled: bool) None#
Enable or disable the module.
- Parameters:
enabled (bool) – Whether the module should be enabled (True) or disabled (False).
- 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:
- 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).