Following is the code I wrote to add a point feature to a shape file.
//********************************************************************* public static void AddToFeatureClass(IFeatureClass baseClass, IGeometry newGeometry) { IFeature newFeature = baseClass.CreateFeature(); newFeature.Shape = newGeometry; (newFeature.Shape as IZAware).ZAware = (newGeometry as IZAware).ZAware; (newFeature.Shape as IMAware).MAware = (newGeometry as IMAware).MAware; } //*********************************************************************
The code could run through and add a record into the shape file. However, in ArcMap attribute table there is no response when I zoom/pan/flash the added point. When I idenfy the point I found that it has an undefined location (see the following screenshoot).
[ATTACH=CONFIG]14373[/ATTACH]
When I use the Visual Studio debug mode to inspect the new feature, I couldn't find any issue. [ATTACH=CONFIG]14374[/ATTACH]
What does it happen? How shall I fix the issue? If more information is needed please let me know. Thank you.