Hi Ken,Actually, i am trying to edit an attribute without looking at the spatial, just like editing a non-spatial table. The flow is like this: find a value, if found then update it with a new valueDo you have a sample ?thanks
protected override void Update(IFeatureClass pFClass,string Query,string Value) { IQueryFilter pQF = new QueryFilterClass(); pQF.WhereClause = Query;//"your query goes here";// eg = name = 'something' IFeatureCursor pFeatureCursor = pFClass.Search(pQF,false) IFeature pFeature = null; int indexFieldinWhichtoUpd = pFClass.Fields.FindField("FieldToUpd"); while ((pFeature = pFeatureCursor.NextFeature())!=null) { pFeature.set_Value(indexFieldinWhichtoUpd,Value); pFeature.Store(); } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.