Text

 

The Text module is created with the CreateModule command by setting the Type to Text. The properties of the Text module are altered with the ModifyModule command. This is similar to the Network | Graphics Output | Text command.

 

Module Type

Text

 

Syntax

object.Construct(“CreateModule”)

object.Option(“Type”, “Text”)

object.Do() or object.DoOnce()

 

object.Construct(“ModifyModule”)

object.Option(“Module”, “Text”)

object.Option(“Option_Name”, “OptionValue”)

object.Do() or object.DoOnce()

 

Option Name

TextText

TextXPos

TextYPos

TextZPos

TextJustification

TextSize

TextColor

TextFont

 

Example

This example shows how to open a new Voxler file, add a Text module, and alter the text.

 

Sub Main

 'Declares VoxlerApp as an object

  Dim VoxlerApp As Object

 

 'Creates an instance of the Voxler application object

 'and assigns it to the variable named "VoxlerApp"

  Set VoxlerApp = CreateObject("Voxler.Application")

 

 'Make Voxler visible

  VoxlerApp.Visible = True

 

 'Access CommandApi

  Set CommandApi = VoxlerApp.CommandApi

 

 'Open an existing file

  CommandApi.Construct ("Open")

  CommandApi.Option ("Path", VoxlerApp.Path+"\Samples\Gold (ScatterPlot).voxb")

  CommandApi.DoOnce()

 

 'Add a text module

  CommandApi.Construct("CreateModule")

  CommandApi.Option ("Type", "Text")

  CommandApi.Do()

 

'Change the text that is displayed in the text to two lines of text

  CommandApi.Construct ("ModifyModule")

  CommandApi.Option ("Module", "Text")

  CommandApi.Option ("TextText", "text in the map coordinates" + vbCrLf + "Multiple lines")

  CommandApi.Do()

End Sub

 

Used by: CommandApi object, CreateModule, ModifyModule

 

 

See Also

Automation Model

Automation Example - Text