question

Jouky D avatar image
0 Likes"
Jouky D asked Felix Möhlmann commented

How to link StateTables with state_current>profile of an object?

Hello,

I have created a StateTable with 8 states. However, when I want to change the state in the Process Flow of an element, I can only use the Default table.

How can I use my new State table? I tried to write the following script to change the state:

#define Default 0

Object object1 = token.MotorElevacion;

int state = 2;

int profile = Default;

object1.setState(state, profile);


changing the Default 0 value into 1 or 2 and using object1.stats.state("NewStateTable").valueString = "State3"; or object1.stats.state("NewStateTable").value = 1;

Could someone help me please?:)

FlexSim 23.0.3
statesstatetableprofile
· 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.

1 Answer

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

A state table only used to influence how states are displayed/interpreted in dashboard charts. In the background the object still uses the default state profile, but the names of the states are "overwritten" by the state table in the chart.

If you want to a add an actual second state profile to an object (that runs in parallel, the object will have a state in each profile) you can follow the description in this post.

· 4
5 |100000

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