add_data_def_when_block(data_def, name, when, branches, diagram=None, position=None, size=None, start_position=(450, 582), label_width=0)#

Add a new when block in a scope.

The graphical properties are expressed 1/100th of mm.

They are considered if and only if the owning when block has a graphical representation.

Parameters:
data_defsuite.DataDef

Input scope, which is an operator, state, or action.

namestr

Name of the block.

whenEX

Pattern of the block.

branchesList[WhenBranch]

List of intermediate structures describing the branches. There must be at least one branch.

diagramsuite.Diagram, default: 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.

positionTuple[float, float] default: None

Position of the block.

sizeTuple[float, float] default: None

Size of the block.

start_positionTuple[float, float], default: (450, 582)

Start position of the branches relative to the block.

label_widthint, default: 0

Width of the label containing the pattern.

Returns:
suite.WhenBlock