ITopologyGraph.Post() Exceptions

Discussion created by aaronfritz13 on May 19, 2010
Latest reply on Oct 26, 2010 by andrewwlsn
Can anyone tell me how to get around an issue I'm having with making edits to topology graph objects and then committing back to the parent feature classes.

Here's a rundown:  I've got two feature class, one polyline and one polygon, included in a FileGDB topology.  I create a number of smaller envelopes based on the full extent of the feature classes in order to avoid the topology graph memory leak issues with building large topologies and then loop through each of those envelopes and build.  I then loop through the edges and based on where a polygon edge is not coincedent with a polyline edge BUT have both the same end nodes, I use the SetEdgeGeometry (and have tried ReshapeEdgeGeometry) to move the poly edge to match the polyline edge.

Here's the problem, if I try to post the changes using the Post method on the topology graph, I run into a 'attempted to read or write protected memory' exception (as well as the additional overhead of posting each individual change).  However, when i try to post all changes at the end of each Envelope loop, the first couple work, but then on my third envelope pass, I get the 'A topology graph edit operation caused a feature geometry to become empty.' exception.

Just FYI, I have the SetEdgeGeometry and Post operations in an active edit session and edit operation...

Question is, if I'm being forced to Post all changes after a full loop through an envelope of topology, how can I know which individual edit is causing the problem and catch/abort it without losing all of the other edits that are good and I want to post back to the original feature class?

I'm stumped, and frustrated yet again with ESRI software and even more so, their horrible documentation/examples of ArcObjects (or complete lack thereof in some cases)....

Any help would be greatly appreciated.