How to fire up editing event?

590
3
Jump to solution
07-23-2021 02:18 PM
YinghongLi1
Occasional Contributor

Here is how this works in ArcGIS:

1.  create an editor event class to have code in onFeatureCreation and onFeatureChange.

2.  the editor event class is called in IExtention class Start method.

3.  When user does editing work,  the code in editor event class fire up automatically.

I want to find a way in AG Pro SDK so certain tasks can be performed when a feature is created or modified.  These tasks can not be done using attribute rule and editor tracking functions.

Thanks.

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Sean_Jones
New Contributor

Hi,

The equivalent Pro events are RowCreatedEvent and RowChangedEvent. These are subscribed on individual layers in Pro rather than globally, as it was in ArcObjects. See also: ProConepts-Editing

To get the ArcObjects equivalent of subscribing to these in an extension, you can subscribe to these Pro events in a pro add-in module and set the modules autoload config to true. See also: EventModule

Note the sample is quite old but the pattern holds.

View solution in original post

3 Replies
Sean_Jones
New Contributor

Hi,

The equivalent Pro events are RowCreatedEvent and RowChangedEvent. These are subscribed on individual layers in Pro rather than globally, as it was in ArcObjects. See also: ProConepts-Editing

To get the ArcObjects equivalent of subscribing to these in an extension, you can subscribe to these Pro events in a pro add-in module and set the modules autoload config to true. See also: EventModule

Note the sample is quite old but the pattern holds.

YinghongLi1
Occasional Contributor

Thanks.  Will give this a try.

I assume RowCreatedEvent works on both feature and table records.....

0 Kudos
YinghongLi1
Occasional Contributor

I used the sample you suggested and result is what i want.  I was wondering if editcompletedevent could contain all the edits before edit save.  actually it only contains the latest one. So works perfect for me.  I also contact ESRI and want to find out why the sample is not in the new version of software and if there is another way to do this.

Thanks for the help.  It saved me lot of digging time.

0 Kudos