Select to view content in your preferred language

Handling RowChanged Events when Splitting a Polyline

109
2
Wednesday
MRJ1
by
Emerging Contributor

Hello,

I am encountering some issues when attempting to handle subscribed RowChanged events that are fired when splitting a polyline feature. The underlying feature class represents a road network and is LRS-enabled. This is an enterprise dataset (SDE) that uses traditional versioning. I am running the built-in Split command when performing the split operation. There are route events associated with the polyline features that I'm splitting.

The split model on the feature class is set to  'Update/Insert', which is the default setting. According to this model when a polyline is split, the original feature is updated, becoming the longest of the two split features. The shorter feature is inserted as a new row into the feature class table.

After some testing on several polyline features, I have discovered that in some cases my RowChanged and RowCreated event handlers are not firing in a consistent way. See examples below:

 

Example #1: This appears to be the most common result when the split is performed:

-  A RowChanged event will fire, presumably because the original polyline is being updated but before its geometry changes?

-  A RowCreated event fires, when the new feature is created (i.e. the Insert feature).

- A RowChanged event fires again, presumably when updating the original feature after its geometry has changed?

When the last RowChanged event fires, I have noticed that in some cases the ObjectID for the row (args.Row.GetObjectID) is not always the ObjectID of the original feature before the split operation occurs, as one would expect. It actually returns the ObjectID of the new feature that is created. Could this be a bug?

 

Example #2: Occurs occasionally, I have not determined the circumstances of why this fire differently that in the first scenario described above:

- A RowCreated event fires.

- A single RowChanged event fires.

 

In summary, I am trying to figure out why the RowChanged events aren't firing in a consistent manner. It's important that these split features are handled properly in my workflows. I did consider changing the Split model to 'Delete/Insert/Insert' but you have to be the data owner to do this. I'm also open to the possibility of a more customized approach (ex: using the Cut method available in the GeometryEngine class). 

Thanks for your time!

0 Kudos
2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

Have you seen ConnerPearce suggestion here?

0 Kudos
sjones_esriau
Esri Contributor

If you're brave you can try subscribing to the internal SplitEvent to get the new and existing feature.
Note this is an unsupported pattern.

sjones_esriau_0-1750904553360.png