Set global variables - Loop
Hi,
I needto set multiple globale variables within a Loop in Visual Logic, but sadly I can't find a way how to do this within a loop and a variable name with a counter.
Example:
gbl_number_1
gbl_number_2
gbl_number_3
...
Code:
LOOP1 >>> gblCount >>> 50
Set "gbl_number_"+gblCount ss_Test[2,gblCount]
Simul8 doesn't recognize the " "gbl_number_"+gblCount " as a global variable.
Does anyone has an idea how to solve this?
The current plan is to import multiple values from excel in the gbl_numbers, which are partially connected to activities (e.g. startup-level, process time, batching out size, Level of queue when a reorder should placed,...)
Br,
Sebastian
Tagged:
Comments
Was this answer helpful?
0
I found a topic which was created some weeks ago by Tom - he's facing the same problem:
https://community.simul8.com/index.php?p=/discussion/486976/using-visual-logic-to-change-global-data-item-value-from-input-spreadsheet#latest
Was this answer helpful?
0
Global varabile needs to be pre-defined
Was this answer helpful?
0
Use an spreadsheet to hold the values and then you can just use the cell index to access and change it. Can you give a better description of "what you are trying to do" as opposed to "how you are doing it".