AnsweredAssumed Answered

GeoDatabase.GetDefinitions throws exception with RasterDatasets

Question asked by tomas1 on Nov 17, 2017
Latest reply on Nov 9, 2018 by jonh_cunrun

I am encountering an exception when I try to retrieve a read only list of RasterDatasetDefinitions from a file geodatabase using the GetDefinitions method.  The file geodatabase being accessed contains a feature class, a mosaic dataset and a raster dataset.


The GetDefinitions method behaves when retrieving feature classes and tables with no problem.

IReadOnlyList<FeatureClassDefinition> featureClassDefinitions = geodatabase.GetDefinitions<FeatureClassDefinition>();

IReadOnlyList<TableDefinition> TableDefinitions = geodatabase.GetDefinitions<TableDefinition>();


The following statement throws the error:

IReadOnlyList<RasterDatasetDefinition> rasterDatasetDefinitions = geodatabase.GetDefinitions<RasterDatasetDefinition>();