# Adding a Sum Constraint

To add a sum constraint to the sketch, select Add Sum Constraint from the Constraints menu. The user will then be prompted to select the first path involved in the constraint, and confirm this path by pressing the Next button at the bottom of the sketch pane.

After selecting the first path, the user will then be prompted to select the second path. Once the second path is selected, the user may then choose Next or Finish depending on whether, in the former case, more paths are involved in the sum constraint, or in the latter case, all paths are accounted for. The user will continue to be prompted to add more paths to the sum constraint until the Finish or Cancel button is pressed. There is no upper bound to how many paths can be involved in a sum constraint.

There are several conditions which must be observed for the successful addititon of a sum constraint:

- All paths involved must target the same entity
- All paths involved must have the first edge in the path be injective
- At least two paths must be selected

Should these conditions not be met, an error message will appear, and the constraint will not be created.

Once the constraint is created, it can be hidden should the user so desire.