RAParametricVar#

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

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper for a parametric input variable.

Parametric input variables can be retrieved via a project’s RAInputVariables. This wrapper provides methods to rename the variable and change its value. Example usage:

input_variables = project.GetInputVariables()
variable = input_variables.CreateVariable('a')

variable.SetName('b')
variable.SetValue(100)

Overview#

GetName

Get the variable’s name.

GetValue

Get the variable’s current value.

SetValue

Set the variable’s current value.

Import detail#

from ansys.rocky.app.ra_input_variables import RAParametricVar

Method detail#

classmethod RAParametricVar.GetWrappedClass()#
classmethod RAParametricVar.GetClassName() str#
RAParametricVar.GetName() str#

Get the variable’s name.

RAParametricVar.GetValue() float#

Get the variable’s current value.

RAParametricVar.SetValue(value: float) None#

Set the variable’s current value.