ClearHistory

 

The Construct method tells Voxler which command to create. The Construct method is accessed from the CommandApi object. The ClearHistory type allows the Voxler program to remove all items from the undo list. This is similar to the Edit | Clear Undo History 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(“ClearHistory”)

 

Construct Type

ClearHistory

 

Example

This example opens the Helens (ContourMap) example file. It then deletes a file. The deletion is undone and then the undo history is cleared.

 

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

 

 'Delete the Heightfield module from the network

  CommandApi.Construct ("DeleteModule")

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

  CommandApi.Do()

 

 'Undo delete module

  CommandApi.Undo()

 

 'Clear undo history

  CommandApi.Construct ("ClearHistory")

  CommandApi.Do()

 

End Sub

 

Used by: CommandApi object

 

 

See Also

Automation Model

Construct Method