question

Kari Payton avatar image
2 Likes"
Kari Payton asked Matthew Gillespie commented

Is there a way to sum the values stored in labels?

I tried doing something like sum(Label: 'labelname' + Label: 'labelname2') to see if it would output the value. The labels have value 10.5 and 6.76.

FlexSim 16.1.0
labels
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Matthew Gillespie commented

You'd want to use code like this:

double sum = getlabel(token, "labelname1") + getlabel(token, "labelname2");
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

The Label: myLabel syntax is just a shortcut for getlabelI(token, "myLabel") and can only be used by itself in a Universal Edit field (blue bordered fields in Process Flow).

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.