The so-called "Formula N" allows a specific entity to be added only once in the module, but allowing the user to increase or decrease the quantity that this item will be repeated.
In this documentation we will use as an example a drawer that should contain 4 drawers. So that it is not necessary to aggregate each drawer individually, it is possible to register the aggregate drawer only once and use the formula N with repetition with a fixed distance.
For that:
1. Access the Registry - Modules menu.
2. Select the drawer in which the drawer will be added by the navigation tree.
3. Access the Inserts tab.
4. Perform the registration of the aggregate drawer normally. To see how to register and configure an aggregate, click here.
5. In Dimension, fill in the desired dimensions in Width, Height and Depth.
IMPORTANT: In the example used, the aggregate drawer already includes the box and the drawer front. We only adjusted the width of the drawer, maintaining the standard height and depth of the drawer, so the Height and Depth fields remained blank.
6. In Positioning, configure the positioning on the axes, but keep the axis that will be configured with the repetition formula blank;
In the drawer example, we fill the X and Y axes with the desired positioning and we leave the Z axis, corresponding to the axis where the repetition should occur, in white, as you can see in the image above.
7. In Repetition, fill in:
Insertion: Number of repeated aggregates when inserting the module in the design;
Minimum: Minimum amount of repetition of the aggregate after insertion in the design;
Maximum: Maximum amount of repetition of the aggregate after insertion into the design.
In the example, we use the fixed quantity of 4 drawers, so that it is not possible to change the quantity, however, it is possible to configure according to the desired quantities.
8. Check the Recalculate checkbox if any of the fields (Insert, Minimum or Maximum) are filled with formulas, so that the repetition is recalculated with each change in the design;
9. In Positioning, in the field of the axis on which the repetition should occur, fill in the repetition formula with a fixed distance:
X axis: VAR1+(($W$+VAR2)*($NI$-1))
Where, VAR1 is the distance value before starting the repetition (from left to right) and VAR2 is the distance value after the repetition.
Y axis: VAR1+(($D$+VAR2)*($NI$-1))
Where, VAR1 is the distance value before starting the repetition (backwards) and VAR2 is the distance value after the repetition.
Z axis: VAR1+(($H$+VAR2)*($NI$-1))
Where, VAR1 is the distance value before starting the repetition (bottom to top) and VAR2 is the distance value after the repetition.
In the example, we use the formula with fixed distance on the Z axis, since the repetition of drawers occurs on this axis and the distances are independent of the number of repeated drawers. If the calculation must be with variable distance, then access the formula editor and, in the side tree, find in Formulas "Repetition with variable distance in ...".
For the drawer example, we calculated a distance between the beginning of the module (including the base of 18mm) and added another 12mm of distance from the base, resulting in the value 30.
Example formula on the Z axis: 30+(($H$+60)*($NI$-1))
As for the distance after the repetition, we add the 38mm left over from the front (from the end of the box to the end of the front) plus the 20mm from the end of the box to the top plus 2mm of clearance between one front and the other, resulting in 60mm, so that when they are repeated over each other, the fronts do not overlap.
10. After configuring formula N, update the registration by clicking on the Refresh icon and test the insertion of the item in the design.