cpicciri

Ignore shape area/length fields

Discussion created by cpicciri on Feb 24, 2011
Latest reply on Feb 24, 2011 by cpicciri
Hi everyone,

I am displaying fields of a layer in a combo box and do not want to include the ESRI generated fields, OID, Shape_Area, etc.

I can easily pick out the OID and geometry fields by using the esriFieldType enumerator, but I cannot do the same for Shape_Area, Shape.Area, etc. because they are field type double and there might be other fields of the same type that I want to show.

I know I can exclude them if I get the name of each field but the shape area and length fields are called different things depending on the data type, Shape.Area, Shape_Area, Shape, etc. I am hoping there is a more elegant way of doing it. I am programming in C# but code in any language will work as I can convert it to what I need.

Thanks,
Carlos


 if (pLayerFields.get_Field(i).Type == esriFieldType.esriFieldTypeOID)

Outcomes