ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 11-13-2008
BenjaminBuecklein's Avatar
BenjaminBuecklein BenjaminBuecklein is offline
Flexsim User
 
Join Date: Sep 2008
Location: Cottbus, Germany
Posts: 11
Downloads: 6
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 142
BenjaminBuecklein is on a distinguished road
Default 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  
Old 11-13-2008
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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)
  #3  
Old 11-13-2008
BenjaminBuecklein's Avatar
BenjaminBuecklein BenjaminBuecklein is offline
Flexsim User
 
Join Date: Sep 2008
Location: Cottbus, Germany
Posts: 11
Downloads: 6
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 142
BenjaminBuecklein is on a distinguished road
Default

Thank you for your quick answer.

I'll try to construct a little demo-modell over weekend to show you exactly what I try to do.

  #4  
Old 11-18-2008
BenjaminBuecklein's Avatar
BenjaminBuecklein BenjaminBuecklein is offline
Flexsim User
 
Join Date: Sep 2008
Location: Cottbus, Germany
Posts: 11
Downloads: 6
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 142
BenjaminBuecklein is on a distinguished road
Default

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  
Old 11-18-2008
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.