This is an example for ChangeType.
'********************************************************************************************
' ChangeTypeModule.bas
' This script creates a function lattice.
' It adds a change type module and changes the properties of the change type module.
'
' -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()
'Create a function lattice
CommandApi.Construct ("CreateModule")
CommandApi.Option("Type", "FunctionLattice")
CommandApi.Option ("AutoConnect", "False")
CommandApi.Do()
'Add a change type module to the function lattice
CommandApi.Construct ("CreateModule")
CommandApi.Option ("Type", "ChangeType")
CommandApi.Option ("AutoConnect", "True")
CommandApi.Option ("SourceModule", "FunctionLattice")
CommandApi.Do()
'Change the output lattice type
'Value is 0, 1, 2, 3, 4, 5, 6, 7, 8
'for Signed 8 bits, Unsigned 8 bits, Signed 16 bits, Unsigned 16 bits,
'Signed 32 bits, Unsigned 32 bits, Signed 64 bits, Float (32 bits), Double (64 bits)
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "ChangeType")
CommandApi.Option ("ChangeTypeOutputType", "2")
CommandApi.Do()
'Change the offset for the change type module output
CommandApi.Option ("ChangeTypeOffset", "20")
CommandApi.Do()
'Change the scale for the change type module output
CommandApi.Option ("ChangeTypeScale", "0.6")
CommandApi.Do()
Wait (2)
'Change the stretch factor for the change type module output
CommandApi.Option ("ChangeTypeStretch", "True")
CommandApi.Do()
End Sub
See Also