Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

locators not showing up in IWorkspace.get_Datasets

$
0
0
I have a locator in a sde versioned geodatabase. When I call IWorkspace.get_Datasets(esriDatasetType.esriDTLocator), I don't get the locator. Shouldn't locators show up using this interface? I hope to be able to copy the locator from an sde geodatabase into a file geodatabase eventually. If that's not possible, please let me know.

Here's my code in C# :

// Get the SDE instance's default version.
IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)sdeWorkspace;
IVersion defaultVersion = null;
try
{
defaultVersion = versionedWorkspace.DefaultVersion;
IWorkspace defVersionWorkspace = (IWorkspace)defaultVersion;
IEnumDataset eds = defVersionWorkspace.get_Datasets(esriDatasetType.esriDTLocator);
eds.Reset();
IDataset ds = eds.Next();
while (ds != null)
{
Console.WriteLine(ds.Name); // this never gets executed because ds = null
ds = eds.Next();
}

Viewing all articles
Browse latest Browse all 1374

Trending Articles