question

Jonathan avatar image
0 Likes"
Jonathan asked Jonathan commented

Hide an operator based on global table value?

Is there a way to either make an operator invisible, or change their position to a defined point offscreen based on a global table value? The trigger for the change would be on reset, after I've set my table values.

I'm simulating my factory and have a table where I can set how many operators are working at their respective build tables. When I have inactive operators this way, I would like to hide them, or move them to an offscreen point.

FlexSim 20.2.3
operatorflexsim 20.2.3object position
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jonathan commented

When you change table values, then you use this event to change the visibility or location. A table has NOT any events to be fired on value change.

change viisibility

set location

property location of Object class


· 5
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

You could also consider adding them to shifts in a timetable and have them walk to /start in an offshift area that you define.

In addition you could connect them to the relevant dispatchers based on your table to further control the work assignments they recieve.
1 Like 1 ·
Jonathan avatar image Jonathan commented ·

how would I use these switch commands for current object (operator)?

I would, presumably, have a code snippet on reset. The code I tried (but didn't work) is:

if (Table("OperatorScenario")[1][1] < 4) switch_hidden(current,0);

if (Table("OperatorScenario")[1][1] == 4) switch_hidden(current,1);

but I was returned the following errors:

Flexscript Error MODEL:/Builder3_86>variables/resettrigger Line 5 Invalid type for parameter 1 in call to command switch_hidden. Expecting treenode. Type is (invalid)

Flexscript Error MODEL:/Builder3_86>variables/resettrigger

Could not finish parsing because of previous errors.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Jonathan commented ·

I can't replicate your issue. But I can't either switch the object to hidden. I tried it with another switch: switch_hideshape. This works.

switch_hideshape.fsm

0 Likes 0 ·
Jonathan avatar image Jonathan Joerg Vogel commented ·

In the alphabetical command reference it says that switch_hidden is "not implemented".

0 Likes 0 ·
Show more comments