AnsweredAssumed Answered

TraceFlowsolver.FindFlowElements Fails

Question asked by BlairServicessLLC on Oct 2, 2014
Latest reply on Oct 16, 2014 by BlairServicessLLC

Hello -

 

Have got a program that tries to perform a "Find Connected" trace  on a network starting on a edge on which an edge flag has been placed and bounded by a set of edge barriers.  It consistently fails at this line:

 

 

tfs.FindFlowElements(esriFlowMethod.esriFMConnected, edgeElements, out junctionEIDs, out edgeEIDs);

 

With this error message:

+  $exception {"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."} System.Exception {System.AccessViolationException}

 

where tfs is a ITraceFlowSolverGEN

 

Barriers are set on edges where an intersection is found between a selected polygon graphic and a line feature and the origin flag is set on the longest line feature found inside the polygon.  The method where the trace is attempted is "ExecuteTrace." The full C# class is attached.

 

I should also say that on occasion the trace has not failed, however its returned results that are the inverse of what I expected -- that is, everything OUTSIDE the polygon is traced when I thought everything INSIDE the polygon would be.

 

Thanks in advance for any suggestions,

Ed

 

 

 


Outcomes