I developed a custom geometric network trace solver function that repeatedly traces a geometric network and dynamically adds and deletes barriers for each trace. After each trace runs, I need to determine if particular features (EIDs) in the network were reached by the trace. In my current solution, I loop through each EID from the trace result???s IEnumNetEID enumeration. Once the desired EID is found, I break the loop and start the tracing process over.
This works, but it can be extremely slow when the result enumeration reaches thousands of records. What???s the optimal way to determine if an IEnumNetEID contains a particular EID value? Is there any way to check the trace results without looping?
It would be great to see an ???IEnumNetEID.Contains??? method, similar to a generic array. I tried casting the IEnumNetEID to various array formats and also using IEIDHelper with no success. Any suggestions? I???m using C# and Arc v10. Thanks!