Constraint Blocks

Constraint blocks can be used to specify complex constraints that blocks must satisfy. They are referenced by blocks via constraints.

Context

With a constraint block, you can:
  • Specify it as the type of a block’s constraint property (see Constraint Properties), so that the constraints specified in the constraint block can be applied to the block.

  • Create parametric diagrams (see Parametric Diagrams) as its sub-diagrams. You can use the diagram to specify the structure of a composite constraint.

For example, the Maximum Dimensions constraint block is referenced by constraints in various blocks.

Procedure

  1. Drag the Constraint Block tool from the toolbox and drop it on your diagram. Specify a name for the constraint block.

    The following properties are available on the Info tab in the General category:

    Property

    Description

    Name/Code/Comment

    Identify the object. The name should clearly convey the object's purpose to non-technical users, while the code, which is used for generating code or scripts, may be abbreviated, and should not normally include spaces. You can optionally add a comment to provide more detailed information about the object. By default the code is synchronized with the name. To decouple name-code synchronization, enter a new code in the Code field.

    The other tabs such as Dependencies and Diagrams contain additional properties information. For details, see Object Properties.
  2. Use the tools in the constraint block's toolbar to create:

    Tool

    Details

     

    Create Parametric Diagram - Create a parametric diagram as the sub-diagram of the constraint block, which is listed in its property sheet Diagrams tab All Diagrams category.

    The new diagram opens in a new tab. The diagram is initialized with a frame, which represents the boundary of the constraint block. All the relevant properties of the constraint block are displayed in the initial layout of the new diagram.

    Constraints - Specify constraints that blocks referencing the constraint block must satisfy.

    Click the Constraint tool, specify an optional constraint name, and either select a further constraint block, or directly enter the constraint specification. Users can define their own logical expressions for the constrain block and the system will verify the objects to check if the expression is fulfilled. For more information, see Verifying Diagrams.

    Parameters - Specify parameters for use in the constraints.

    Click the Parmeter tool and specify a parameter name and data type.

  3. [optional] Use the Create Parametric Diagram tool to create a parametric diagram as the sub-diagram of the constraint block, which is listed in its property sheet Diagrams tab All Diagrams category.

    The new diagram opens in a new tab. The diagram is initialized with a frame, which represents the boundary of the constraint block. The relevant properties of the block are also displayed on the diagram frame.

  4. [optional] To view a sub-diagram owned by the constraint block, click the + icon on the block's symbol to open a list of all its sub-diagrams, then select a sub-diagram as appropriate.
    The diagram opens in a new tab.