ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
||||
|
||||
Update of global variables
Hello everyone,
I made a modell with a lot of global variables and now I'd like to use the experimenter. But the experimenter can't change global variables. I assigned a label to an object and now tried to update the global variable with this label. But the global variable is not set with the value of the label. I used code to manage this "ON RESET": T1=getlabelnum(current,LabelT1); T1 is the global variable. And I tried to set the global variable(gv) in the gv window as an TreeNode pinting in the tree on the LabelT1 of the object. I hope you know what I try to do How can I manage this? I'm running out of ideas... |
#2
|
||||
|
||||
Benjamin,
It should be no problem to set an global variable. I made a global variable TS of type int and I made a small model (source, queue, processor, sink) and on the exit trigger of the processor I wrote: TS = getoutput(current); And if I go to the script console and type TS it gives me the output of the processor. If you make a treenode global variable and you want to use that to change the value of the label you have to write something like: setnodenum( gv, 123); (where gv is the global treenode variable and 123 is the value you want to write on that label) So maybe you could make a small demomodel to show us what you want to do and we can tell you why it is not working Steven |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
BenjaminBuecklein (11-18-2008) |
#4
|
||||
|
||||
Okay, I think its not necessary because I've solved my problem.
I don't know why, I did the same thing I did before and now the modell updates the global variables. Sometimes Flexsim behaves a bit strange Thank you for your help |
#5
|
||||
|
||||
I think you have to give Flexsim the confidence that it can do it and then it will
I'm glad it works now! Steven |
Thread | Thread Starter | Forum | Replies | Last Post |
Update Flexsim.com | Lolke Koopmans | Marketing and Sales Information | 12 | 10-17-2008 02:09 PM |
Limit in the completion hints? Global Tables, Global Variables, etc.? | Tom David | Gripes and Goodies | 6 | 09-09-2008 04:05 PM |
Experimenter variables | Xavier Jackson | Gripes and Goodies | 4 | 09-09-2008 10:00 AM |
State files and global variables | Markus Bans | Q&A | 3 | 07-08-2008 12:22 PM |
can I use an edit box entry to update multiple labels? | KelvinHo | Q&A | 10 | 03-28-2008 07:17 AM |