Vizard 7 » Command Index » Vizard modules » viz » <viz>.addText
7.6

<viz>.addText

Adds text to the scene

<viz>.addText(  
value  
parent = viz.WORLD  
scene = viz.MainScene  
)  
value
The initial value of the text object
parent = viz.WORLD
viz.WORLD
viz.SCREEN
viz.ORTHO
<node3d> object
scene = viz.MainScene
If the parent is viz.WORLD or viz.SCREEN, then the argument represents the scene to add the object to.
If the parent is viz.ORTHO, then the argument represents the window to add the object to.
If the parent is a valid node3d object, then the argument is ignored.

Remarks

This command creates a flat texture-based node for displaying text in the scene.

When adding text objects to viz.ORTHO, use the <node3d:text3d>.fontSize command to adjust the size. Text objects are aligned to the bottom left corner by default.

Return Value

<node3d:text3d> object

Example

object = viz.addText('Hello World')

See also

<viz>.addText3D
<viz>.addButton
<viz>.addButtonLabel
<viz>.addCheckbox
<viz>.addDropList
<viz>.addProgressBar
<viz>.addRadioButton
<viz>.addSlider
<viz>.addTextbox