When configuring a BOM template used for creating a BOM on a drawing, we have the option to group the results based on a user assigned category. To do this we need to:
- Have the drawings made before the model extract is created and registered to the model.
- Insert a new field in the BOM template. This can be very small, as it will not appear when the template is used on a drawing.
- To make this a field which controls the grouping, we need to first add in the BOM text dialog box the token: "Group" - %GroupBy
- Add another token after the "Group" to set the group rule. For example, this can be:
- Assembly Number (%MNum). This is usually used in the "Structure list" template type. It will group all the elements belonging to a main part, instead of having all the elements strictly in the order set by the list sorting.
- Object Class Id (%ClassId). This token will group based on the class of the elements. For example, if we have beams and plates detailed on a drawing this will group the beams and plates separately.
- After the field is added, we must add this to the group field that it controls. Using the "Group Fields" command, select the group (for example, in most cases this is DETAILS), click "Add", and select the "Group by" field.
- Save the template.
For this example the following steps are performed:
Model a warehouse, number it and create the drawings with a "All main parts with single parts" drawing process style. 2.
Create a BOM on a drawing list. For more information read the following FAQ: https://www.graitec.com/faq-item/faq-2116-how-to-modify-a-bom-on-drawing-template-i/ 3.
After you create the list as you want add a new field with the "Create list fields"
command in GROUPHEADER. Insert the token %GroupBy
and %Object Class Id
in the field.
4. Click the "Group fields" command and add the newly created field to GROUPHEADER, as mentioned above.
5. Save the BOM template and close it.
6. Open a drawing from the "Document Manager" and insert the newly created list. Next, update the list.
Because the list is created with the token "GroupBy" and "Object Class Id", the parts should be grouped separately by their class (beam, plate, purlins, etc.).
If, in the same list, the token is changed to "Group By" and "Assembly Number" then the parts will be grouped by the main part from which they belong.