Prev Next

Bind Parameters of a ConstraintProperty

Access

Context menu

In a diagram, click on an existing Constraint Property | Edit Constraint Property...

Other

In Project Browser | Drag a Constraint Block and drop it on a Parametric diagram

A Constraint Property with all the parameters will be created

Bind parameter to properties in context

In this example, we create the Constraint Block 'FMA' and use it as a Constraint Property 'fma' in the context of a Block 'FMA_Test', which contains three properties: 'Property1', 'Property2' and 'Property3'.

Right-click on Constraint Property 'fma' and select the 'Edit Constraint Property...' context menu option to open the 'SysML ConstraintProperty Parameter Binding' dialog.

Binding parameters to properties in context

Click on the Browse. button in the same row as a parameter to open the 'Hierarchy Properties Picker' dialog; choose a property to bind to the parameter.

After binding, the property will be shown on the diagram and a connector will connect it to the parameter of the constraint property. The equation 'F =M*A' becomes 'Property2 = Property3 * Property1' after binding.

Hierarchy Element Binding

In this example, Block BaseController has a Constraint Property e6 with parameters a, b and c. Now we want to bind the parameters to the Block's properties. Specifically, we want to bind parameter e6.c to cIn.val, which is a Flow Property defined in Block ReadSignal; cIn is the Port defined on BaseController.

Binding parameters to properties in context in Sparx Systems Enterprise Architect.

This figure shows the hierarchy of properties defined in BaseController. The properties with matching type to the binding parameter will be shown with a check box for selection.

Binding parameters to properties in context in Sparx Systems Enterprise Architect.

We select property val under cIn and click on the OK button. The property val will be created on the diagram inside the Port cIn, and a Binding connector between cIn.val and e6.c will be created.  After binding parameter e6.a to property error, and e6.b to property ref, the diagram will resemble this:

Binding parameters to properties in context in Sparx Systems Enterprise Architect.

Navigate to ConstraintBlock

Select the cell of the Constraint Property.

Binding parameters to properties in context in Sparx Systems Enterprise Architect.

Click on the Browse. button on the right to edit the typing Constraint Block. The 'Edit Constraint Block' dialog displays.

Binding parameters to properties in context in Sparx Systems Enterprise Architect.