AnsweredAssumed Answered

Update attributes for selected (edit mode)

Question asked by davecouture on Jun 22, 2012
Latest reply on Jun 26, 2012 by davecouture
I'm trying to build a form that would assign a value to a field, for the selected features, during an edit session.  The user would create a new feature (in Edit mode) and the form would fill the attribute table. If the user is not in edit mode, the table won't be updated.

I'm kinda stuck there (vb.NET):

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim pMxDoc As IMxDocument         Dim pLayer As ILayer         Dim pFLayer As IFeatureLayer         Dim pFeatClass As IFeatureClass         Dim pMap As IMap         Dim pCursor As ICursor         Dim pFSel As IFeatureSelection         Dim pSelSet As ISelectionSet2          pMxDoc = My.ArcMap.Document         pMap = pMxDoc.FocusMap         pLayer = pMxDoc.SelectedLayer         pFLayer = pLayer         pFeatClass = pFLayer.FeatureClass         pCursor = pFeatClass.Update(Nothing, True)         pFSel = pLayer         pSelSet = pFSel.SelectionSet         pSelSet.Update(Nothing, False, pCursor)          Do Until pFSel Is Nothing             pFSel.Value(pFSel.Fields.FindField("Source")) = "Coordinate"             pFSel = pFSel.Next         Loop  End Sub

Outcomes