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
|
|||
|
|||
Dynamic text and timer
Hello,
Is there a direct way of adding dynamic text to a simulation using the Visual Tool? I had an idea with a string global variable that is displayed , and it is constantly changed throughout the simulation, the only problem is that during one tasksequence I would need that global variable to chance twice, and I don't exactly know how to do that. Also, what is the new line character in FlexSim? Because \n doesn't work, it displays an empty check box. And is there a way of displaying a timer on the screen during the simulation? Thank you. |
#2
|
||||
|
||||
Dear Andreea Adda,
The solution is attached with the post.You have to use refreshglobalvariables() command to update global variables.I have used task sequence in the queue which sends message to the queue to update text before loading and unloading tasks.The timer can be attached to the screen using billboard property of visual tool.I think the \n command can be used if you toggle the codes as c++ in the code edit window.Hope this helps.The link given below will give idea on how to change global variable.If I am wrong ignore this post http://www.flexsim.com/community/for...lobal+variable Regards, Arun KR CCS,India Last edited by Phil BoBo; 08-07-2014 at 08:21 AM. Reason: removed bad example model |
The Following 4 Users Say Thank You to arunkrmahadeva For This Useful Post: | ||
Tom David (08-07-2014) |
#3
|
|||
|
|||
Yes, it worked, than you very much. Though I do not see where in your model does the queue send a message to itself, but I managed to get my model working, thank you again.
|
#4
|
||||
|
||||
Dear Andrea,
The message is send as a task.For viewing the task check the task sequence code under the use transport option of the Queue. Regards, Arun KR CCS,India |
#6
|
||||
|
||||
Dear Andreaa,
The task type break causes the TaskExecuter to "break" from its currently active task sequence to a new task sequence.For better understanding of task sequences refer the Flexsim documentation of task sequences. Regards, Arun KR CCS,India |
#7
|
||||
|
||||
That's not what refreshglobalvariables() command is for. Do not use it like that. That command is for developer use to configure all the global variables so that they can be used globally. You should not execute it while the model is running. Just use the global variable by name; that's its purpose.
Also, the node you are setting is the reset value of the global variable, not its current value. Do not change this value during the model run. Just use the global variable directly. To set the value of a global variable, you just assign it a new value with the = operator: Code:
myglobalvariable = "loaded"; Code:
string localvariable = myglobalvariable; Last edited by Phil BoBo; 11-19-2014 at 05:53 PM. |
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Tom David (08-08-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
How to display dynamic text next to an object | Cliff King | Tips and Tricks | 4 | 11-11-2010 01:45 PM |
Line break in string text | Congshi Wang | Q&A | 3 | 11-10-2010 12:56 PM |
Scaling text in opengl | Steven Hamoen | Q&A | 10 | 12-09-2008 04:18 PM |
Sensors with Timer Delays | Joe Allen | Q&A | 0 | 09-19-2008 04:16 PM |
Triangle and Text Demo | Brandon Peterson | Tips and Tricks | 0 | 05-09-2008 10:12 AM |