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
|
|||
|
|||
Variable for Flexsim Object
Hello,
does anyone know if I can set a variable for a Flexsim object like for a number? For example: Object Processor1 = last(model) like int NumberCustomer = 50 I want to connect these objects by calling the object variable so I don't have to open the node everytime: I want to do it this way: contextdragconnection(Processor1, Processor2, "A") and not this way: contextdragconnextion(node("/Processor1",model()),node("/Processor1",model()),"A") Thanks a lot! |
#2
|
||||
|
||||
local variable:
treenode Processor1 = node("/Processor1",model()); treenode lastobject = last(model()); or make a global variable: main menu option Tools > Global Variables. Add a "Tree Node" type global variable. |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Congshi Wang (08-02-2010) |
#4
|
||||
|
||||
It is possible, but you shouldn't do it unless you know exactly what you are doing. There is probably a much better way to do whatever you are doing rather than dynamically adding global variables via Flexscript code.
|
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Congshi Wang (08-04-2010) |
Thread | Thread Starter | Forum | Replies | Last Post |
Why the object’s color can not show in Flexsim 5.02? | Frans Zeng | Q&A | 6 | 07-26-2010 02:41 PM |
Storing a C++ class pointer in a flexsim object | Steven Hamoen | Q&A | 2 | 04-15-2010 09:19 AM |
Global variable as experiment variable | Matthias Hofmann | Q&A | 3 | 09-08-2009 09:42 AM |
COM Object for Controlling Flexsim | Anthony Johnson | User Development | 6 | 02-25-2009 11:43 AM |
Flexsim Please Help - 99 Variable Limit | Joe Allen | Q&A | 13 | 11-19-2008 12:03 PM |