laptop and a wrench

Error

"IWorkspace::get_DatasetNames(esriDatasetType.esriDTAny)" fails to list FeatureClasses that are inside FeatureDatasets.

Última publicación: October 6, 2017 ArcGIS for Desktop
Número de ID del error NIM060535
EnviadoAugust 25, 2010
Última modificaciónJune 5, 2024
Relacionado conArcGIS for Desktop
Versión encontrada10.0
Lenguaje del programaC#
Sistema operativoWindows OS
Versión de sistema operativoXP
EstadoWill Not Be Addressed

Información adicional

This defect was submitted for a release of ArcGIS that is no longer supported. If this is still an issue in a supported release, please contact Technical Support.

Solución alternativa

Use one of the below two procedures to access FeatureClasses which are inside FeatureDatasets. Procedure 1: Use "IFeatureWorkspace::OpenFeatureClass("<Name of FeatureClass>")" Procedure 2: Use the "GeoProcessor" class. Sample Code: ESRI.ArcGIS.Geoprocessor.Geoprocessor GP = new ESRI.ArcGIS.Geoprocessor.Geoprocessor(); // Set the input workspace environment and list all FeatureClasses And FeatureDatasets. GP.SetEnvironmentValue("workspace", "….\Connection to csslsystem-146.sde"); string strDSetName = ""; string strFCName = ""; ESRI.ArcGIS.Geoprocessing.IGpEnumList FDSets = GP.ListDatasets("*", ""); if ((FDSets != null)) { FDSets.Reset(); strDSetName = FDSets.Next(); while (!string.IsNullOrEmpty(strDSetName)) { MessageBox.Show("Dataset : " + strDSetName); ESRI.ArcGIS.Geoprocessing.IGpEnumList shapefiles = GP.ListFeatureClasses("*", "", strDSetName); if ((shapefiles != null)) { shapefiles.Reset(); strFCName = shapefiles.Next; while (!string.IsNullOrEmpty(strFCName)) { MessageBox.Show("Dataset : " + strDSetName + " - FeatureClass : " + strFCName); strFCName = shapefiles.Next; } } } } ESRI.ArcGIS.Geoprocessing.IGpEnumList shapefiles2 = GP.ListFeatureClasses("*", "", strDSetName); if ((shapefiles2 != null)) { shapefiles2.Reset(); strFCName = shapefiles2.Next; while (!string.IsNullOrEmpty(strFCName)) { MessageBox.Show("Standalone FeatureClass : " + strFCName); strFCName = shapefiles2.Next; } }

Pasos para reproducir

ID del error: NIM060535

Software:

  • ArcGIS for Desktop

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga