question

Ashlee W avatar image
0 Likes"
Ashlee W asked Ashlee W commented

Location Acquired in Label?

Hi there,

I can't seem to get the name of the bed my patient acquires in a label. What is the proper syntax for this?

FlexSim 22.1.0
labelssyntaxacquired location
5 |100000

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

James Rodgers1 avatar image
0 Likes"
James Rodgers1 answered Ashlee W commented

The error is because the "Unscheduled Beds" group is missing the "c".

1654008803582.png

But there's an additional issue. Each bed needs to be named individually in the group to use the "group" search mechanism. I added a script to put all the beds into the group.


orthosurgery-inpatientbeds-actuallosv2-priority_2.fsm


· 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.

James Rodgers1 avatar image
0 Likes"
James Rodgers1 answered Ashlee W commented

You would need to check each group to see if the acquired location is a member using the group.isMember method:

Object bed = patient.Locations[1];

string groupname;

if(Group("Beds") .isMember(bed))

groupname = Group("Beds").name;

· 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.

James Rodgers1 avatar image
0 Likes"
James Rodgers1 answered Ashlee W commented

The last acquired location would be under patient.Locations[1] so you can access the name of the location by

string bedname = patient.Locations[1].name;

· 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.