Jump to content

Server Processing State Variable


simiouser1
 Share

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

Link to comment
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, "")

Link to comment
Share on other sites

×
×
  • Create New...