Skip to content

Instantly share code, notes, and snippets.

@odoe
Created May 18, 2011 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odoe/978842 to your computer and use it in GitHub Desktop.
Save odoe/978842 to your computer and use it in GitHub Desktop.
IQueryDef to IFeatureCursor sample 1
IFeatureDataset fd = workSpace.OpenFeatureQuery("sde.Parcels", queryDef); // use the IQueryDef to get an IFeatureDataset
IFeatureClassContainer fcc = fd as IFeatureClassContainer; // cast it as am IFeatureClassContainer
IFeatureClass featureClass = fcc.get_ClassByName("sde.Parcels"); // pull the IFeatureClass out of the container
IQueryFilter qf = new QueryFilterClass(); // just need an empty QueryFilter
IFeatureCursor fc = featureClass.Search(qf, false); // now I have an IFeatureCursor that I can use to access the Feature attributes and geometries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment