question

David Seo avatar image
0 Likes"
David Seo asked Matthew Gillespie commented

I want to use the People Setting labelset data in the token...

I am making an HC example model using 2019 update 2.

I want to use the People Setting labelset data as the token's same label name value.

I can't copy the patient's label and value to token. How can I do it?

hc-up2-tuto11.fsm

FlexSim 19.1.1
labelspeople modulepeople settings
hc-up2-tuto11.fsm (425.1 KiB)
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

The People Settings labels are all copied onto the patient in the 3D view. So you don't really need to have the labels on the token, you can just enter patient.WalkAmbu whenever you need to reference that label value.

If you really want to copy that value to the token you can do this, but the PersonLabels statistics table only tracks when the label on the patient changes so I wouldn't recommend doing this. If you just want to copy one label you can use an Assign Labels activity and assign the token a WalkAmbu label with the value of patient.WalkAmbu. If you want to copy all the patient labels you would want to use a Custom Code activity with a for loop like this:

  1. treenode patient = current;
  2.  
  3. for(int i = 1; i < labels(patient).subnodes.length; i++) {
  4. treenode patientLabel = labels(patient).subnodes[i];
  5. token.labels.assert(patientLabel.name).value = patientLabel.value;
  6. }
· 2
5 |100000

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