#1
|
|||
|
|||
Display a variable in main graphics window
How can I display the current value of a variable? All I need is something that works like the print statement but prints to the graphics window not the input/output window. Text boxes and dialogue boxes can show content but, as far as I can see, the content can't be a variable - it can only be a text string. Any tips appreciated!
|
#2
|
|||
|
|||
Hi,
As Vizard is Python based, you actually can use Python's function to convert your variable to a string and show it in a text box or dialogue box. Please try this simple sample: Code:
import viz viz.go() a = 10 b = 3 box = viz.addTextbox() box.setPosition(.5,.5) box.message(str(a + b)) |
#3
|
|||
|
|||
Thank you Kevin - good of you to take the trouble.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unexpected Change of Window Size | javadi | Vizard | 7 | 07-23-2013 03:56 PM |
Main window size larger than monitor | dpamplona | Vizard | 2 | 01-25-2012 02:55 PM |
After update to 4.01.0036: exe fails to initialize graphics window | Huib | Vizard | 1 | 06-27-2011 06:02 PM |
display the position and euler coords of the main view | Josh | Vizard | 1 | 03-22-2010 11:48 AM |
Viewpoints outside the main window | sjroorda | Vizard | 7 | 11-03-2005 07:11 AM |