question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Tee Hiett commented

What is the Command to set the color of a dressing room floor?

When a patient enters a dressing room, I would like to set the floor color to green. When the patient leaves I would like to set the four-color back to light gray. How do I do this?

Thanks,

Tee

FlexSim HC 5.1.0
healthcareadvanced visual optionsobject floor
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

·
Paul Toone avatar image
1 Like"
Paul Toone answered Tee Hiett commented

Tee,

I was able to do this within the entry and exit triggers using the setnodenum command. I added the following to the entry trigger code:

setnodenum(node(">variables/FloorColor/red",current),0);
setnodenum(node(">variables/FloorColor/green",current),.5);
setnodenum(node(">variables/FloorColor/blue",current),0);

and I added the following in the exit trigger:

setnodenum(node(">variables/FloorColor/red",current),.9);
setnodenum(node(">variables/FloorColor/green",current),.9);
setnodenum(node(">variables/FloorColor/blue",current),.9);

This is done by selecting the dressing room and selecting the 'Directly edit code' button on the two triggers as shown below:

I have also included a sample model for you to view this technique in action.


floorpicture.jpg (373.7 KiB)
floorcolor.fsm (77.7 KiB)
· 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.

Tee Hiett avatar image Tee Hiett commented ·

Thanks, Paul. Really a great explanation in response to my question.

The only thing that I changed was I used "Edit this trigger's operation/Code Snippet" instead of "Directly edit code" which made it easier to replace the title "Code Snippet" with a meaningful name.

Thanks,

Tee

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.