Copies a locator.
[Visual Basic 6.0] Sub CopyLocator(
ByVal srcName As String, _
ByVal dstName As String _
)
[Visual Basic .NET] Public Sub CopyLocator ( _ ByVal srcName As String, _ ByVal dstName As String _ )
[C#] public void CopyLocator ( string srcName, string dstName );
[Java] public void copyLocator ( String srcName, String dstName ) throws IOException, AutomationException
[C++]
HRESULT CopyLocator(
BSTR srcName,
BSTR dstName
);
Parameters
srcName [in]
srcName is a parameter of type BSTR
dstName [in]
dstName is a parameter of type BSTR
The CopyLocator method creates a copy of the specified locator in the same locator workspace.
The srcName parameter is the name of the locator that you want to copy. The dstName parameter is the name for the copy of the locator.
Within the default local locator workspace, and within ArcSDE locator workspaces, locator names are prefixed by a user name. In local locator workspaces, the locator name is prefixed by the user name of the current user, as in "jack.My Locator". In ArcSDE workspaces, the locator name is prefixed by the name of the ArcSDE user that owns the locator, as in "SDE.My Locator". When you call methods in ArcObjects that have parameters for selecting locators from a locator workspace, you must specify the full name of the locator, including the user name. Failing to do so will result in an error.
In the case of the CopyLocator method, the srcName parameter must be prefixed by the user name, if the locator workspace is the default local locator workspace or an ArcSDE workspace. The dstName parameter does not need to be prefixed with a user name; the locator workspace will add the user name when storing the copy of the locator.
ILocatorWorkspace Interface | ILocatorWorkspace.AddLocator Method | ILocatorWorkspace.DeleteLocator Method | ILocatorWorkspace.CopyLocator Method