- 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_def
suite.DataDef
Input scope, which is an operator, state, or action.
- name
str
Name of the block.
- when
EX
Pattern of the block.
- branches
List
[WhenBranch
] List of intermediate structures describing the branches. There must be at least one branch.
- diagram
suite.Diagram
, default: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.- position
Tuple
[float
,float
] default:None
Position of the block.
- size
Tuple
[float
,float
] default:None
Size of the block.
- start_position
Tuple
[float
,float
], default: (450, 582) Start position of the branches relative to the block.
- label_width
int
, default: 0 Width of the label containing the pattern.
- data_def
- Returns:
suite.WhenBlock