ViewSize

 

The Construct method tells Voxler which command to create. The Construct method is accessed from the CommandApi object. The ViewSize type sets the Viewer window to a specific size in pixels.

 

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(“ViewSize”)

 

Construct Type

ViewSize

 

Parameter

Type

Description

XSize

Unsigned

Width of the viewer window, in pixels.

YSize

Unsigned

Height of the viewer window, in pixels.

 

Example

This example opens the Helens (ContourMap) example file. It then changes the Viewer window size.

 

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

 

  'Set VoxlerApp = GetObject(,"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()

 

'Sets the viewer window size

  CommandApi.Construct("ViewSize")

  CommandApi.Option ("XSize", "400")

  CommandApi.Option ("YSize", "400")

  CommandApi.Do()

 

End Sub

 

Used by: CommandApi object

 

 

See Also

Automation Model

Construct Method