WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 09-13-2013, 02:21 PM
laker laker is offline
Join Date: Sep 2013
Posts: 2
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!
Reply With Quote
Old 09-16-2013, 05:35 AM
Kevin Chiu Kevin Chiu is offline
WorldViz Team Member
Join Date: Feb 2012
Posts: 26

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:
import viz


a = 10
b = 3

box = viz.addTextbox()
box.message(str(a + b))
Reply With Quote
Old 09-17-2013, 12:56 PM
laker laker is offline
Join Date: Sep 2013
Posts: 2
Thank you Kevin - good of you to take the trouble.
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Unexpected Change of Window Size javadi Vizard 7 07-23-2013 02:56 PM
Main window size larger than monitor dpamplona Vizard 2 01-25-2012 01:55 PM
After update to 4.01.0036: exe fails to initialize graphics window Huib Vizard 1 06-27-2011 05:02 PM
display the position and euler coords of the main view Josh Vizard 1 03-22-2010 10:48 AM
Viewpoints outside the main window sjroorda Vizard 7 11-03-2005 06:11 AM

All times are GMT -7. The time now is 02:32 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC