Save

 

The Construct method tells Voxler which command to create. The Construct method is accessed from the CommandApi object. The Save type allows the Voxler program to save the network to a Voxler VOXB file for future use. This is similar to the File | Save 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("Save")

 

Construct Type

Save

 

Parameter

Type

Description

Path

string

Name of the path where the file is to be saved

 

Example

This example opens the Helens (ContourMap) example file. It renames the HeightField module. It then saves the Voxler file to a new location.

 

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

 

'Rename the HeightField Module

  CommandApi.Construct("RenameModule")

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

  CommandApi.Option ("Name", "New HeightField Name")

  CommandApi.Do()

 

 'Save the file to a new name

  CommandApi.Construct("Save")

  CommandApi.Option ("Path", "c:\golden\voxler\savedfromscript.voxb")

  CommandApi.Do()

 

End Sub

 

Used by: CommandApi object

 

 

See Also

Automation Model

Construct Method