.. vale off :class:`Variable` ================= .. py:class:: ansys.mechanical.stubs.v241.Ansys.ACT.Mechanical.Fields.Variable Bases: :py:obj:`object` Represents an object that is either an input or an output for a P:Ansys.ACT.Mechanical.Fields.Variable.Field. Depending on whether it is an input or output and on the way it is defined, this object holds a series of discrete values or an expression that may involve other variables. .. !! processed by numpydoc !! .. py:currentmodule:: Variable Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~GetDiscreteValue` - Changes a value at a given position in the tabular definition of the variable. * - :py:attr:`~SetDiscreteValue` - Changes a value at a given position in the tabular definition of the variable. .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~DefinitionType` - Gets a value that indicates how this variable is defined. * - :py:attr:`~DiscreteValueCount` - Gets the number of discrete values of this variable. * - :py:attr:`~DiscreteValues` - Gets or sets the discrete values of this variable or * - :py:attr:`~Field` - Gets the owner field. * - :py:attr:`~Formula` - Gets or sets the expression that is used to defined this variable, or * - :py:attr:`~Index` - Gets the index of this variable in its container field. * - :py:attr:`~IsInput` - Gets a value indicating whether this variable is an input for its container field. Otherwise, it is an output variable. * - :py:attr:`~IsOutput` - Gets a value indicating whether this variable is an output for its container field. Otherwise, it is an input variable. * - :py:attr:`~MinMaxDiscreteValues` - Returns a Tuple containing the min and max values from the list of discrete values. * - :py:attr:`~Name` - Gets the variable's name. * - :py:attr:`~QuantityName` - Gets the name of the quantity represented by this variable. * - :py:attr:`~Range` - Gets the domain of validity for variable's value. * - :py:attr:`~Unit` - Gets the symbol of the unit used to express this variable's values. Property detail --------------- .. py:property:: DefinitionType :type: Optional[Ansys.ACT.Mechanical.Fields.VariableDefinitionType] Gets a value that indicates how this variable is defined. .. !! processed by numpydoc !! .. py:property:: DiscreteValueCount :type: Optional[int] Gets the number of discrete values of this variable. .. !! processed by numpydoc !! .. py:property:: DiscreteValues :type: Optional[List[Ansys.Core.Units.Quantity]] Gets or sets the discrete values of this variable or .. !! processed by numpydoc !! .. py:property:: Field :type: Optional[Ansys.ACT.Mechanical.Fields.Field] Gets the owner field. .. !! processed by numpydoc !! .. py:property:: Formula :type: Optional[str] Gets or sets the expression that is used to defined this variable, or .. !! processed by numpydoc !! .. py:property:: Index :type: Optional[int] Gets the index of this variable in its container field. .. !! processed by numpydoc !! .. py:property:: IsInput :type: Optional[bool] Gets a value indicating whether this variable is an input for its container field. Otherwise, it is an output variable. .. !! processed by numpydoc !! .. py:property:: IsOutput :type: Optional[bool] Gets a value indicating whether this variable is an output for its container field. Otherwise, it is an input variable. .. !! processed by numpydoc !! .. py:property:: MinMaxDiscreteValues :type: Optional[tuple[Ansys.Core.Units.Quantity, Ansys.Core.Units.Quantity]] Returns a Tuple containing the min and max values from the list of discrete values. .. !! processed by numpydoc !! .. py:property:: Name :type: Optional[str] Gets the variable's name. .. !! processed by numpydoc !! .. py:property:: QuantityName :type: Optional[str] Gets the name of the quantity represented by this variable. .. !! processed by numpydoc !! .. py:property:: Range :type: Optional[Ansys.ACT.Mechanical.Fields.Range] Gets the domain of validity for variable's value. .. !! processed by numpydoc !! .. py:property:: Unit :type: Optional[str] Gets the symbol of the unit used to express this variable's values. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: GetDiscreteValue(index: int) -> Ansys.Core.Units.Quantity Changes a value at a given position in the tabular definition of the variable. .. !! processed by numpydoc !! .. py:method:: SetDiscreteValue(index: int, value: Ansys.Core.Units.Quantity) -> None Changes a value at a given position in the tabular definition of the variable. .. !! processed by numpydoc !! .. vale on