The Construct method tells Voxler which command to create. The Construct method is accessed from the CommandApi object. The Import type allows the Voxler program to import an existing file into the Network Manager. This is similar to the File | Import command.
The Construct method must be used in combination with the Option method and the Do or DoOnce method to create an object.
Note that when importing point or well data (ACCDB, CSV, DAT, DBF, LAS, MDB, SLK, TXT, XLS, or XLSX), the columns are specified in the DataSrc options.
Syntax
object.Construct("Import")
Construct Type
Import
Parameter |
Type |
Description |
AutoConnect |
Boolean |
If True, the new data is automatically connected. If False, the new data is not automatically connected. |
ClearOptions |
Boolean |
If True, clear all filter options before adding a new option. If False, a new option will be concatenated to existing options. |
ClearPath |
Boolean |
If True, clear current paths to import before adding a new path. If False, the new path will be concatenated to existing paths. |
Filter |
Filter id. Specify the file type, based on the filter ID. |
|
GuiEnabled |
Boolean |
True enables dialogs in the Voxler window. False disables dialogs. |
Option |
String |
One or more (key, value) pairs to be passed to the filter. Packed as "key=value", with multiple pairs comma or semicolon-separated. |
Options |
String |
One or more (key, value) pairs to be passed to the filter. Packed as "key=value", with multiple pairs comma or semicolon-separated. |
Path |
String |
The full path to a file to be imported. One or more paths can be specified by calling this method multiple times. |
PersistOptions |
Boolean |
If True, persist filter options in the registry. If False, options are not saved. |
ProgressEnabled |
Boolean |
True displays progress bars. False disables progress bars. |
UndoRedoEnabled |
Boolean |
True allows undo and redo commands. False disallows undo and redo commands on the import. |
The Import type imports data files into the Network Manager. To open a data file in the worksheet, use the Open construct type.
Example
This example loads a VDAT file and attaches a volrender to it.
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
'Load a VDAT file format
CommandApi.Construct("Import")
CommandApi.Option("GuiEnabled", "False")
CommandApi.Option("ProgressEnabled", "False")
CommandApi.Option("UndoRedoEnabled", "True")
CommandApi.Option("AutoConnect", "False")
CommandApi.Option("ClearOptions", "False")
CommandApi.Option("Filter", "vdat")
CommandApi.Option("Path", "c:\Program Files\Golden Software\Voxler 4\Samples\Jaw.vdat")
CommandApi.Option("PersistOptions", "True")
CommandApi.Do()
'Attach a volrender to the VDAT
CommandApi.Construct ("CreateModule")
CommandApi.Option ("Type", "VolRender")
Commandapi.Option ("AutoConnect", "True")
CommandApi.Option ("SourceModule", "Jaw.vdat")
CommandApi.Do()
End Sub
Used by: CommandApi object
See Also