I built an Arcobjects add-in in the past that records the username and datetime every time a feature is created or modified:
Sub OnStartEditing_Handler() AddHandler Events.OnCreateFeature, AddressOf OnCreateChangeFeature_Handler AddHandler Events.OnChangeFeature, AddressOf OnCreateChangeFeature_Handler End Sub Sub OnCreateChangeFeature_Handler(ByVal obj As ESRI.ArcGIS.Geodatabase.IObject) Dim feature As IFeature = CType(obj, IFeature) 'Update Date field 'Update Username field End Sub
I have recently been working on another add-in that updates a different field during an edit session:
'Populate Feature attribute m_editor.StartOperation() m_feature.Value(m_hgtFieldIdx) = CInt(height) m_editor.StopOperation("Measure Height")
The second add-in successfully updates the field, however the first add-in is not updating the username and date fields. Does the StartOperation() or StopOperation() not fire the OnChangeFeature event? I cannot find any documentation for this situation. If not, can I fire it programmatically, or is there another way to catch feature(s) changed during the Start/StopOperation()?