How to summarize variable of type "distance list" in Custom Component Editor.

Tekla Structures custom component distance list
Not version-specific
Tekla Structures
Environment
Not environment-specific
Question:
I am creating a custom component. I am using variable of type "Distance list" for bolt distances. I would like to get a sum of values entered into that variable to get a total length e.g:
P1 = 2*50.00 30.00
P2 = sum(P1)

Variable P2 should return 130 but sum() function does not work on "Distance list" variable type. How can I summarize the values put into Distance list type variable?

Answer:

In Tekla Structures 2020 version you can use the parameter Distance list total for this:
Image
dist_list_total.png
 

In older Tekla Structures version, the "Distance list" variable type cannot be easily summarized. To do that, you need to create additional variables for every value you are going to put as a distance and add them manually to create the distance list and summary variables.

Below example shows variables P2, P3, P4, P5 wchich contain single distances, then variable P1 creates a distance list from them, and variable P6 adds them up to show a total length. 

Image
distance_list_correct.png
Was this helpful?