Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

so following this link

I am able to convert my featureLayer into a shape file and export it.

However, some how for 1 specific layer that i tested with i always get this error:

Item NOT found in collection

during this piece of code:

IFeatureDataConverter featureDataConverter = new FeatureDataConverterClass();
IEnumInvalidObject enumInvalidObject =
  featureDataConverter.ConvertFeatureClass(((IDataset)featureLayer.FeatureClass).FullName as IFeatureClassName,
  null, null, targetFeatureClassName, targetGeometryDef, targetFields, "", 1000, 0);

// Check for errors.
IInvalidObjectInfo invalidObjectInfo = null;
while ((invalidObjectInfo = enumInvalidObject.Next()) != null)
    // Handle the errors in a way appropriate to the application.
    Debug.WriteLine("Errors occurred for the following feature: {0}, {1}",
      invalidObjectInfo.InvalidObjectID, invalidObjectInfo.ErrorDescription);
    result = false;

It does not crash, but the enumInvalidObject always gives me the error Item not found in this collection.

Does anyone have an idea on what may cause this, I know saying that ONE of my layer don't work is very vague, but i really dont know what is special about that layer.

It does export the shape file, but no features inside.

Thanks and Regards,


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.