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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2014
AndreeaAdda AndreeaAdda is offline
Flexsim User
 
Join Date: Jul 2014
Posts: 7
Downloads: 1
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
AndreeaAdda is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 08-06-2014
arunkrmahadeva's Avatar
arunkrmahadeva arunkrmahadeva is offline
CCS, India
 
Join Date: Sep 2013
Location: India
Posts: 71
Downloads: 67
Uploads: 0
Thanks: 285
Thanked 101 Times in 51 Posts
Rep Power: 144
arunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rough
Thumbs down

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
Reply With Quote
The Following 4 Users Say Thank You to arunkrmahadeva For This Useful Post:
AndreeaAdda (08-07-2014), Jörg Vogel (08-07-2014), sagar bolisetti (08-07-2014), Tom David (08-07-2014)
  #3  
Old 08-07-2014
AndreeaAdda AndreeaAdda is offline
Flexsim User
 
Join Date: Jul 2014
Posts: 7
Downloads: 1
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
AndreeaAdda is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 08-07-2014
arunkrmahadeva's Avatar
arunkrmahadeva arunkrmahadeva is offline
CCS, India
 
Join Date: Sep 2013
Location: India
Posts: 71
Downloads: 67
Uploads: 0
Thanks: 285
Thanked 101 Times in 51 Posts
Rep Power: 144
arunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rough
Default

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
Reply With Quote
  #5  
Old 08-07-2014
AndreeaAdda AndreeaAdda is offline
Flexsim User
 
Join Date: Jul 2014
Posts: 7
Downloads: 1
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
AndreeaAdda is on a distinguished road
Default

Oh, I understand. One last question, though. What is the TASKTYPE_BREAK used for?
Reply With Quote
  #6  
Old 08-07-2014
arunkrmahadeva's Avatar
arunkrmahadeva arunkrmahadeva is offline
CCS, India
 
Join Date: Sep 2013
Location: India
Posts: 71
Downloads: 67
Uploads: 0
Thanks: 285
Thanked 101 Times in 51 Posts
Rep Power: 144
arunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rough
Default

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
Reply With Quote
  #7  
Old 08-07-2014
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Exclamation

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";
To read the value of a global variable, you just type its name:
Code:
string localvariable = myglobalvariable;
Also, using "\n" is how you use a newline character in both C++ and Flexscript, but the 3d draw text functionality of FlexSim ignores newline characters. If you want to have multiple lines of 3d text, use multiple 3d text objects.

Last edited by Phil BoBo; 11-19-2014 at 05:53 PM.
Reply With Quote
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post:
AndreeaAdda (08-08-2014), arunkrmahadeva (08-07-2014), Jörg Vogel (08-07-2014), Tom David (08-08-2014)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -6. The time now is 02:14 PM.


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