ansys.scade.apitools.create.data_def.add_data_def_equation#
- ansys.scade.apitools.create.data_def.add_data_def_equation(data_def: scade.model.suite.DataDef, diagram: scade.model.suite.Diagram | None, lefts: Sequence[scade.model.suite.LocalVariable | ansys.scade.apitools.create.type.TX], right: ansys.scade.apitools.create.expression.EX | None, position: Tuple[float, float] = (0, 0), size: Tuple[float, float] = (0, 0), symmetrical: bool = False, rotation: int = 0, textual: bool = False) scade.model.suite.Equation #
Create an equation in a scope.
Parameters#
- data_defsuite.DataDef
Input scope, which is an operator, state, or action.
- diagramsuite.Diagram | None
Diagram containing the equation. The diagram specified can be either graphical or textual, or it can be
None
. However, it cannot beNone
if the scope contains at least one diagram.- leftsSequence[Union[suite.LocalVariable, TX]]
List of variables defined by the equation. The elements can be either an existing local variable or a type tree to create an internal variable on the fly when the diagram is a graphical diagram.
- rightEX | None
Expression of the equation.
- positionTuple[float, float], default: (0, 0))
Position of the equation, expressed in 1/100th of mm. This value is ignored if the diagram is not a graphical diagram. Otherwise, it must be specified.
- sizeTuple[float, float], default: (0, 0)
Size of the equation, expressed in 1/100th of mm. This value is ignored if the diagram is not a graphical diagram. Otherwise, it must be specified.
- symmetricalbool, default: False
Whether the graphical representation is symmetrical.
- rotationint, default: 0
Rotation angle of the equation, expressed in degrees. Options are
0
,90
,180
, and270
.- textualbool, default: False
Whether the equation is a textual. If
False
, the equation is a graphical representation.
Returns#
suite.Equation