AnsweredAssumed Answered

Adding Geometric Network Trace to Map Using ArcPy

Question asked by behClevest on May 18, 2017
Latest reply on May 18, 2017 by curtvprice

I am able to run Geometric Network Trace by using following ArcPy script but I also need to add Trace result into the map. Can you please let me know how I can add the result(graphic/geometry) to the map.

import arcpy

arcpy.env.workspace = r"E:/Utility/Sample/Montgomery.gdb"
# Local variables:
G_N = "E:/Utility/Sample/Montgomery.gdb/Water/Water_Net"
Flag = "E:/Utility/Sample/Flag.shp"
traceOut = "traceOut_Net"

# Process: Trace Geometric Network
arcpy.TraceGeometricNetwork_management(G_N, traceOut, Flag, "TRACE_UPSTREAM", "", "", "", "", "", "NO_TRACE_ENDS", "", "", "", "AS_IS", "", "", "", "AS_IS")
print "Trace Done"

Outcomes