IFeatureLayer layer = FrmMain.m_mapControl.get_Layer(0) as IFeatureLayer;
IFeatureClass featureClass = layer.FeatureClass;
IFeature feature = featureClass.CreateFeature();
IPoint point = new PointClass();
float H = float.Parse(txtX.Text.ToString());
float Z = float.Parse(txtY.Text.ToString());
point.PutCoords(H, Z);
feature.Shape = point;
feature.Store();
FrmMain.m_mapControl.ActiveView.Refresh();
时间: 2024-12-15 11:38:45