I'm developing an ArcMap add-in that will run a trace against a water main that the user has selected using the selection tool. The geometric is already defined and I can run the trace by manually placing the edge barriers at each end of the main, putting an edge flag somewhere on the water main between the edge barriers and then tracing downstream (using indeterminate flow). Basically I am displaying a list of all the customers that are receiving water from that water main.
I'd like to automate this so that the user doesn't need to place barriers or flag(s) but just needs to select the water main and hit a button to preform the trace. I guess my pseudocode would be something like:
- User selects a water main
- User clicks my Add-In button
- Place Edge Barrier at both ends of selected water main segment
- Place Flag somewhere between barriers
- Run the trace getting all the curbstop valves fed by the water main
As I said I can already perform the trace manually, I just want things to be automated. How would I do this?