This is an example of the cutting plane being used with a Contour module.
'********************************************************************************************
' cutting plane contour.BAS
' This script creates a contour map and modifies the cutting plane properties.
'
' -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()
'Load the data file
CommandApi.Construct("Import")
CommandApi.Option("AutoConnect", "False")
CommandApi.Option ("DefaultPosition", "True")
CommandApi.Option ("Path", "c:\program files\golden software\Voxler 4\Samples\GoldConcentration.dat")
CommandApi.Option ("Filter", "dat")
CommandApi.Option ("Options", "Defaults=1;EatWhitespace=1;Delimiter=Space,tab,comma,semicolon;TextQualifier=doublequote,quote")
CommandApi.Option ("GuiEnabled", "False")
CommandApi.Do()
'Add a gridder module
CommandApi.Construct("CreateModule")
CommandApi.Option ("AutoConnect", "True")
CommandApi.Option ("SourceModule", "GoldConcentration.dat ")
CommandApi.Option ("Type", "Gridder")
CommandApi.Do()
'Grid the data
CommandApi.Construct("ModifyModule")
CommandApi.Option("Module","Gridder")
CommandApi.Option("Gridder3Auto", "true")
CommandApi.Option("Gridder3DoIt", "true")
CommandApi.Do()
'Add a contours module
CommandApi.Construct("CreateModule")
CommandApi.Option ("AutoConnect", "True")
CommandApi.Option ("SourceModule", "Gridder")
CommandApi.Option ("Type", "Contours")
CommandApi.Do()
'Change the cutting plane orientation
'Value is 0, 1, 2, or 3 for XY Plane (Axial), XZ Plane (Coronal), YZ Plane (Sagittal), or Custom
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Contours")
CommandApi.Option ("ContourPlaneOrientation", "2")
CommandApi.Do()
'Change the X Normal Direction For the cutting plane
'Only available if ContoursPlaneOrientation is set to 3
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Contours")
CommandApi.Option ("ContourPlaneXNormal", "30")
CommandApi.Do()
'Change the Y Normal Direction For the cutting plane
'Only available if ContoursPlaneOrientation is set to 3
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Contours")
CommandApi.Option ("ContourPlaneYNormal", "30")
CommandApi.Do()
'Change the Z Normal Direction For the cutting plane
'Only available if ContoursPlaneOrientation is set to 3
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Contours")
CommandApi.Option ("ContourPlaneZNormal", "60")
CommandApi.Do()
'Change the offset of the cutting plane from the center of the lattice
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Contours")
CommandApi.Option ("ContourPlaneOffset", "-7.5")
CommandApi.Do()
'Display the cutting plane dragger
CommandApi.Construct ("ModifyModule")
CommandApi.Option ("Module", "Contours")
CommandApi.Option ("ContourPlaneShowDragger", "True")
CommandApi.Do()
End Sub
See Also