How to change the State Profile in Set Object State?

How to change the State Profile in Set Object State?

jouky_d
Not applicable
291 Views
5 Replies
Message 1 of 6

How to change the State Profile in Set Object State?

jouky_d
Not applicable

[ FlexSim 23.2.1 ]

Hello everyone,

I am trying to change the state of a BasicFR. However, I don't know how to call another StateTable different to the Default value. I know there is a way to change the Table states of the BasicFR object and I know I do not need it for Dashboards because I can choose on the Dashboards a different state profile than the Set Object State Profile chosen. However, I have some states bigger than 50 and I don't want to change the Default table adding more states. I woul like to use the created stateTables.

1710148450270.png

My StateTable is something like:1710148639315.png

The Default StateTable riches the 50 state, but not 301 if I do not add it.

1710148655899.png

0 Likes
Accepted solutions (1)
292 Views
5 Replies
Replies (5)
Message 2 of 6

joerg_vogel_HsH
Mentor
Mentor
@Jouky D, there is the sampler tool behind edit field “State Profile”. Use it to select your customized state profile in your ToolBox. Or you should find it under small black down arrow in a list.
0 Likes
Message 3 of 6

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

State tables have nothing to do with changing an object's state. They are only used in conjunction with dashboard charts where they control the display name and which states count as 'utilized' or not or are excluded from the chart entirely.

The "STATE_STOPPED" and other such expressions are global defines that make it so users do not have to look up the state numbers when filling in the state field. Anywhere you enter "STATE_STOPPED" you could just as well write "48".

You can create your own defines for the added state numbers in the toolbox under global macros. Or you just type 301, 302, ... into the state field.

If you want the object to display the correct name in its statistics panel, you have to update the state profile manually (after the state was added by setting the object to it once).

1710156644326.png

Message 4 of 6

jouky_d
Not applicable

What do you mean by type 301, 302,... into the state field? Do I have to create a new StateTable from Default and adding 301, 302 states? The error exception I get is:

time: 26.271192 exception: FlexScript exception: Tracked Variable method 'getCategoryName' at /Object1/SubObject1>stats/state_current: invalid category number.


0 Likes
Message 5 of 6

moehlmann_fe
Enthusiast
Enthusiast
That error is 'normal'. It should only appear once, when the object is first set to state that does not yet exist in its profile.
0 Likes
Message 6 of 6

jouky_d
Not applicable
Okay Thank you!:)
0 Likes