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(); } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.