The DataSrc module is created with the Import command. The properties of the DataSrc are altered with the ModifyModule command. This is similar to the File | Import command.
Syntax
object.Construct(“Import”)
object.Option(“Filter”, “Filter_Type”)
object.Option(“Path”, “Full_Path”)
object.Do() or object.DoOnce()
object.Construct(“ModifyModule”)
object.Option(“Module”, “data_src_name”)
object.Option(“Option_Name”, “OptionValue”)
object.Do() or object.DoOnce()
Option Name
Example 1
This example shows how to load a data source file and set the output type to points.
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 a point data file
CommandApi.Construct ("Import")
CommandApi.Option ("GuiEnabled", "False")
CommandApi.Option ("AutoConnect", "False")
CommandApi.Option ("ClearOptions", "False")
CommandApi.Option ("Filter", "dat")
CommandApi.Option ("Path", "C:\Program Files\Golden Software\Voxler 4\Samples\Mineral Concentration.dat")
CommandApi.Option ("Options", "Defaults=1;EatWhitespace=1;Delimiter=Space,tab,comma,semicolon;TextQualifier=doublequote,quote")
CommandApi.Do()
'Set the Output Type to points
CommandApi.Construct("ModifyModule")
CommandApi.Option("Module","Mineral Concentration.dat")
CommandApi.Option("OutputType","0")
CommandApi.Do()
End Sub
This example shows how to load a data source file and set the output type to wells.
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 a well data file
CommandApi.Construct ("Import")
CommandApi.Option ("GuiEnabled", "False")
CommandApi.Option ("AutoConnect", "False")
CommandApi.Option ("ClearOptions", "False")
CommandApi.Option ("Filter", "xlsx")
CommandApi.Option ("Path", "C:\Program Files\Golden Software\Voxler 4\Samples\SampleWellData.xlsx")
CommandApi.Option ("Options", "Defaults=1;Sheet=Collars")
CommandApi.Do()
'Set the Output Type to wells
CommandApi.Construct("ModifyModule")
CommandApi.Option("Module","SampleWellData.xlsx - Collars")
CommandApi.Option("OutputType","1")
CommandApi.Do()
End Sub
Used by: Import, ModifyModule
See Also