question

Darwin S avatar image
0 Likes"
Darwin S asked Jeff Nordgren commented

How to Get Value of Global Variable with Array?

Hi

I'm trying to get the Value of Array From my Global Variable but the Script Always return Empty Array

Here is My Model

Added EDD_autosave.fsm

Here is the Code that i use (I used it in Object Accepted ) as Entry Trigger

I already declared the Global Variable like This

But it always Return Empty Array in the Code


Thank you

FlexSim 19.0.9
flexsim 19.0.9arrayscriptglobal variable
· 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

tannerp avatar image
1 Like"
tannerp answered

@darwin.s,

Your model is trying to access the 0 index of the array, but it can't because in FlexSim, Arrays are 1-based. See the User Manual for more information.

I suggest setting the initial value of the "OrderArrayIndex" Global Variable to 1 instead of 0. Then the model should work just fine. I hope this helps!

added-edd-autosave_1.fsm


5 |100000

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