The Light module is created with the CreateModule command by setting the Type to Light. The properties of the Light module are altered with the ModifyModule command. This is similar to the Network | General Modules | Light command.
Module Type
Light
Syntax
object.Construct(“CreateModule”)
object.Option(“Type”, “Light”)
object.Do() or object.DoOnce()
object.Construct(“ModifyModule”)
object.Option(“Module”, “Light”)
object.Option(“Option_Name”, “OptionValue”)
object.Do() or object.DoOnce()
Option Name
Example
This example shows how to open an existing Voxler file, and add a Light module.
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\Helens (ContourMap).voxb")
CommandApi.DoOnce()
'Add a light module
CommandApi.Construct("CreateModule")
CommandApi.Option ("AutoConnect", "False")
CommandApi.Option ("Type", "Light")
CommandApi.Do()
End Sub
Used by: CommandApi object, CreateModule, ModifyModule
See Also