Gashi Posted June 21, 2023 Share Posted June 21, 2023 Hello, i would like to know if its possible to track the different values for a user defined MyModelEntity state. In my case, i created different states like MyModelEntity.MaterialCosts and MyModelEntity.HoldingCosts, ...TransportCosts ... etc. The values are summed up in a state called MyModelEntity.ProductionCosts. This state is shown as a dynamic label text in my model, so i can see the production cost value at the actual time. But is it possible to see the different values of the MyModelEntity states that make up the production costs for instance during different periods of times in the simulation or at any time? Because i would like to see the values of my states like MyModelEntity.MaterialCosts at certain times in the simulation. Thank you! Link to comment Share on other sites More sharing options...
ViniciusF Posted June 22, 2023 Share Posted June 22, 2023 Hi! Yes, there is a way. What you could do is use a String.Format expression. This way you can show multiple variables on the dynamic text. On your case something like: String.Format("{0}: {1} {2}{3}: {4}", "Material Costs", MyModelEntity.MaterialCosts, String.NewLine, "ProductionCosts", MyModelEntity.ProductionCosts) should work. As a plus, you could use a state to disable/enable these labels with a button and a process. Something like: Math.If(EnableTxT, String.Format("{0}: {1} {2}{3}: {4}", "State1", ModelEntity.State1, String.NewLine, "State2", ModelEntity.State2), "") 1 Link to comment Share on other sites More sharing options...
Recommended Posts