DeleteModule

The Construct method tells Voxler which command to create. The Construct method is accessed from the CommandApi object. The DeleteModule type allows the Voxler program to delete an existing module from the Network Manager. This is similar to the Edit | Delete command.

 

The Construct method must be used in combination with the Option method and the Do or DoOnce method to create an object.

 

Syntax

object.Construct(“DeleteModule”)

 

Construct Type

DeleteModule

 

Parameter

Type

Description

Module

string

Name of the module to be deleted

ModuleID

unsigned

Numeric ID of the module to be deleted

 

Example

This example opens the Helens (ContourMap) example file. It deletes the HeightField module from the Network Manager.

 

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

 

 'Open an existing file

  CommandApi.Construct ("Open")

  CommandApi.Option ("Path", VoxlerApp.Path+"\Samples\Helens (ContourMap).voxb")

  CommandApi.DoOnce()

 

 'Delete the HeightField module from the network

  CommandApi.Construct ("DeleteModule")

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

  CommandApi.Do()

 

End Sub

 

Used by: CommandApi object

 

 

See Also

Automation Model

Construct Method