ansys.scade.apitools.create.data_def.add_data_def_assertion#

ansys.scade.apitools.create.data_def.add_data_def_assertion(data_def: scade.model.suite.DataDef, diagram: scade.model.suite.Diagram | None, name: str, expr: ansys.scade.apitools.create.expression.EX, kind: AK = AK.ASSUME, position: Tuple[float, float] = (0, 0)) scade.model.suite.Assertion#

Create an assertion 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 be None if the scope contains at least one diagram.

namestr

Name of the assertion.

exprEX

Expression of the assertion.

kindAK, default: ASSUME

Kind of the assertion.

positionTuple[float, float], default: (0, 0)

Position of the assertion, expressed in 1/100th of mm. This value is ignored if the diagram is not a graphical diagram. Otherwise, it must be specified.

Returns#

suite.Assertion