欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

ArcEngine开发—使用ITable批量修改属性字段内容

程序员文章站 2022-06-28 17:27:03
ArcEngine开发笔记——使用ITable批量修改属性字段内容IFeatureLayer riv_layer = pAxMap.get_Layer(cbo_Riv.SelectedIndex) as IFeatureLayer; IFeatureClass riv_class = riv_layer.FeatureClass; int rivN_index = riv_class.FindField("river_N"); IT...
	仅作自己记事本~~(草稿本)~~ 使用,若有不懂,纯属正常。
		private void Button1_Click(object sender, EventArgs e)
        {
            IFeatureLayer riv_layer = pAxMap.get_Layer(cbo_Riv.SelectedIndex) as IFeatureLayer;
            IFeatureClass riv_class = riv_layer.FeatureClass;
            int rivN_index = riv_class.FindField("river_N");

            ITable pTable = riv_class as Table;
            ICursor pCursor = pTable.Update(null, true);
            IRow pRow;
            while((pRow = pCursor.NextRow()) != null)
            {
                pRow.set_Value(rivN_index, 0);
                pCursor.UpdateRow(pRow);
            }
        }

本文地址:https://blog.csdn.net/weixin_41646552/article/details/112664280

相关标签: c#