question

Jouky D avatar image
0 Likes"
Jouky D asked Jouky D commented

How to change the State Profile in Set Object State?

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

FlexSim 23.2.1
statetabledefaultset object state
1710148450270.png (8.6 KiB)
1710148639315.png (9.0 KiB)
1710148655899.png (19.3 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.

Joerg Vogel avatar image Joerg Vogel commented ·
@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 0 ·

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Jouky D commented

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


1710156644326.png (36.7 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jouky D avatar image Jouky D commented ·

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 0 ·
Felix Möhlmann avatar image Felix Möhlmann Jouky D commented ·
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 0 ·
Jouky D avatar image Jouky D Felix Möhlmann commented ·
Okay Thank you!:)
0 Likes 0 ·