This document is archived and information here might be outdated. Recommended version. |
Names of participating locators.
[Visual Basic .NET]
Public ReadOnly Property LocatorNames As Object
[C#]
public object LocatorNames {get;}
[C++]
HRESULT get_LocatorNames(
Variant* LocatorNames
);
[C++] Parameters LocatorNames [out, retval]
LocatorNames is a parameter of type VARIANT*
The LocatorNames method returns a string that contains a list of names of the participating locators.
Public Sub testICompositeLocator_Single()
Dim locManager As ESRI.ArcGIS.Location.ILocatorManager2
locManager = New ESRI.ArcGIS.Location.LocatorManagerClass
Dim locWrkSpc As ESRI.ArcGIS.Geodatabase.ILocatorWorkspace
locWrkSpc = locManager.GetLocatorWorkspaceFromPath("C:\Mylocators")
Dim myLocator As ESRI.ArcGIS.Geodatabase.ILocator
myLocator = locWrkSpc.GetLocator("CompositeLocator1")
Dim compLoc As ESRI.ArcGIS.Location.ICompositeLocator
On Error Resume Next
compLoc = myLocator
On Error GoTo 0
If myLocator Is Nothing Then
Debug.Print(myLocator.Name & " is not a composite locator")
Exit Sub
End If
Dim participatingLocNameList() As String
participatingLocNameList = compLoc.LocatorNames
Dim participatingLocName As Object
For Each participatingLocName In participatingLocNameList
Debug.Print(participatingLocName)
Dim partLoc As ESRI.ArcGIS.Geodatabase.ILocator
partLoc = compLoc.Locator(participatingLocName)
Debug.Print(" ++++ " & partLoc.Description)
Next participatingLocName
End Sub