This is an example for LoadGeometry.
'********************************************************************************************
' load geometry.BAS
' This script loads an IV geometry file.
' It then changes the properties of the geometry.
'
' -by SKP 4/2010
'
'********************************************************************************************
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()
'Loads an IV file
CommandApi.Construct ("Import")
CommandApi.Option ("GuiEnabled", "False")
CommandApi.Option ("AutoConnect", "False")
CommandApi.Option ("ClearOptions", "False")
CommandApi.Option ("Filter", "iv")
CommandApi.Option ("Path", "C:\Program Files\Golden Software\Voxler 4\Samples\Earth.iv")
CommandApi.Do()
'Change the draw style for the IV file
'Value is 0, 1, 2, or 3 for As is, Shaded, Lines, Points
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Earth.iv ")
CommandApi.Option ("GeomSrcDrawStyle", "2")
CommandApi.Do()
'Change the file path for the IV file
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Earth.iv ")
CommandApi.Option ("GeomSrcFilename", "C:\Program Files\Golden Software\Voxler 4\Samples\spacestation.iv")
CommandApi.Do()
End Sub
See Also