Environment

 

The Environment module is the Viewer Window module. It is created automatically when you create a new VOXB file or open an existing VOXB file in Voxler. The properties of the Environment module are altered with the ModifyModule command. This is similar to clicking on the Viewer Window module in the Network Manager and changing the properties in the Property Manager.

 

Module Type

Environment

 

Syntax

object.Construct(“ModifyModule”)

object.Option(“Module”, “Viewer Window”)

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

object.Do() or object.DoOnce()

 

Option_Name

EnvironmentBackgroundColor

EnvironmentAmbientIntensity

EnvironmentAmbientColor

EnvironmentFogType

EnvironmentFogColor

EnvironmentVerticalExaggeration

 

Example

This example shows how to open an existing file and change the background color.

 

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()

 

 'Alter the Viewer Window background color setting

  CommandApi.Construct ("ModifyModule")

  CommandApi.Option ("Module", "Viewer Window")

  CommandApi.Option ("EnvironmentBackgroundColor", "20% Black")

  CommandApi.Do()

End Sub

 

Used by: CreateModule, ModifyModule

 

 

See Also

Automation Model