Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!

Click_Here_button.png

New Software Release

Our latest release, Simio 11, is here!

Sign in to follow this  
simiouser1

Server Processing State Variable

Recommended Posts

Hello:


I need to know a value from a state of an entity which is been processing into a server.

I've attached a label, but I don't know the instruction to know this.

Let me explain better, I have a model entity with a state variable called String, the Value is a Name. I need, when an entity come in into a server and this server start to processing, show this state into a label.


Thanks

Share this post


Link to post
Share on other sites

To acess a state variable of an entity that is being processed at a server (let's call it Server1) you should type the following into the label, assuming there is only a single entity at the server:

Server1.Processing.Contents.FirstItem.ModelEntity.Name


Mind that you will get a warning if you run with such expression in a label, because you will be at times trying to reference an entity at an empty station. Then, you should expand the expression to:

Math.if(Server1.Processing.Contents.NumberWaiting != 0, Server1.Processing.Contents.FirstItem.ModelEntity.Name, "")

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...