How can i count how many parts with a certain part position that are located on each floor
Not version-specific
Tekla Structures
Environment
Not environment-specific
Question:
I have several beams with the part position BP/40. I want my template to count the total amount of all BP/40 beams but also put intermediate counts in columns on how many beams that are located on each floor.
Answer:
First of all, you need an attribute which defines the floor to which the part is counted to. Use the Organizer to do this.
In this article, we show you how to use the user-defined attribute comment.
In this example we have:
In the template, add a value field for part position and number. Add three value fields for counting the subtotals of the number of beams on each floor. If you add another floor you just need to add another value field.
Next, define a rule for each value field. The rule is used to count the number of beams on a certain floor. The condition must be adjusted for each value field. The value field below works so that if the beam is located on Floor2 the attribute is set to 1.
Remember to select the Sum values across all rows check box!
When you print the report it will look different depending on whether you have selected Distinct or Combine as the row Sort type.
If you use Distinct the view will look like this when printing:
If you use Combine (=Combine equal rows), the view looks like this. Here you can see that the templates sums all the 1s and 0s which lead to a report with both a total count and subtotals for each floor.
I have several beams with the part position BP/40. I want my template to count the total amount of all BP/40 beams but also put intermediate counts in columns on how many beams that are located on each floor.
Answer:
First of all, you need an attribute which defines the floor to which the part is counted to. Use the Organizer to do this.
In this article, we show you how to use the user-defined attribute comment.
In this example we have:
- 6 BP/40 beams in total of which:
- 3 beams are located on floor1
- 1 beam are located on floor2
- 2 beams are located on floor3
Image
In the template, add a value field for part position and number. Add three value fields for counting the subtotals of the number of beams on each floor. If you add another floor you just need to add another value field.
Next, define a rule for each value field. The rule is used to count the number of beams on a certain floor. The condition must be adjusted for each value field. The value field below works so that if the beam is located on Floor2 the attribute is set to 1.
Remember to select the Sum values across all rows check box!
Image
When you print the report it will look different depending on whether you have selected Distinct or Combine as the row Sort type.
Image
If you use Distinct the view will look like this when printing:
Image
If you use Combine (=Combine equal rows), the view looks like this. Here you can see that the templates sums all the 1s and 0s which lead to a report with both a total count and subtotals for each floor.
Image