The DuplicateFilter module is created with the CreateModule command by setting the Type to DuplicateFilter. The properties of the DuplicateFilter are altered with the ModifyModule command. This is similar to the Network | Computational | DuplicateFilter command.
Module Type
DuplicateFilter
Syntax
object.Construct(“CreateModule”)
object.Option(“SourceModule”, “data file name”)
object.Option(“Type”, “DuplicateFilter”)
object.Do() or object.DoOnce()
object.Construct(“ModifyModule”)
object.Option(“Module”, “DuplicateFilter”)
object.Option(“Option_Name”, “OptionValue”)
object.Do() or object.DoOnce()
Option Name
Example
This example shows how to add a duplicate filter to a data file.
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 Duplicate Filter module to remove points that are too close together
CommandApi.Construct ("CreateModule")
CommandApi.Option ("Type", "DuplicateFilter")
CommandApi.Option ("AutoConnect", "True")
CommandApi.Option ("SourceModule", "GoldConcentration.dat ")
CommandApi.Do()
End Sub
Used by: CreateModule, ModifyModule
See Also