HeightField

 

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

 

Module Type

HeightField

 

Syntax

object.Construct(“CreateModule”)

object.Option(“SourceModule”, “data file name”)

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

object.Do() or object.DoOnce()

 

object.Construct(“ModifyModule”)

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

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

object.Do() or object.DoOnce()

 

Options Name

HeightFieldColormap

HeightFieldComponent

HeightFieldDrawStyle

HeightFieldLabelFormatNumDigits

HeightFieldLabelFormatPostfix

HeightFieldLabelFormatPrefix

HeightFieldLabelFormatType

HeightFieldLegendAntialias

HeightFieldLegendBGColor

HeightFieldLegendCustomLabels

HeightFieldLegendEnable

HeightFieldLegendFGColor

HeightFieldLegendFont

HeightFieldLegendLabelHeight

HeightFieldLegendLength

HeightFieldLegendNumLabels

HeightFieldLegendOrientation

HeightFieldLegendShowBackground

HeightFieldLegendTitle

HeightFieldLegendTitleHeight

HeightFieldLegendUseCustomLabels

HeightFieldLegendWidth

HeightFieldLegendXPos

HeightFieldLegendYPos

HeightFieldOpacity

HeightFieldOrientation

HeightFieldOverlayFit

HeightFieldOverlayModulation

HeightFieldOverlayQuality

HeightFieldOverlayShow

HeightFieldSlice

HeightFieldScale

 

 

Example

This example shows how to import a lattice, import an image, and create a heightfield from both. It then changes the drawing style.

 

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

 

 'Create a new Voxler document

  CommandApi.Construct ("New")

  CommandApi.DoOnce()

 

 'Load the lattice

  CommandApi.Construct ("Import")

  CommandApi.Option ("Path", VoxlerApp.Path+"\Samples\Elevation.dem")

  CommandApi.Option ("GuiEnabled", "False")

  CommandApi.Option ("Filter", "dem")

  CommandApi.Do()

 

 'Import a TIF file

  CommandApi.Construct ("Import")

  CommandApi.Option ("Path", VoxlerApp.Path+"\Samples\Overlay.tif")

  CommandApi.Option ("Filter", "tif")

  CommandApi.Do()

 

 'Add a heightfield module

  CommandApi.Construct("CreateModule")

  CommandApi.Option ("AutoConnect", "True")

  CommandApi.Option ("SourceModule", "Elevation.dem")

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

  CommandApi.Do()

 

'Connect TIF as overlay

  CommandApi.Construct("ConnectModules")

  CommandApi.Option("SourceModule", "Overlay.tif")

  CommandApi.Option("TargetModule", "HeightField")

  Commandapi.Option("TargetPort", "1")

  CommandApi.Do()

 

'Change the height field drawing style

 'this is 0, 1, or 2 for shaded, lines, or points

  CommandApi.Construct("ModifyModule")

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

  CommandApi.Option("HeightFieldDrawStyle", "1")

  CommandApi.Do()

End Sub

 

Used by: CommandApi object, CreateModule, ModifyModule

 

 

See Also

Automation Model

Automation Example - HeightField