Select to view content in your preferred language

Select Data tool for Python?

2053
10
04-06-2017 12:56 PM
by Anonymous User
Not applicable

There is a modelbuilder tool called 'Select Data' that pulls a single  layer out of a group layer.

I am using Python to do geometric tracing and the outputs are group layers.

Does anyone know the Python equivalent of "Select Data"?

I guess I could cycle through and find the right layer, but if there's an easier way, I'd like to know.

I am assuming there is a (relatively) easy way to do this in Python. Otherwise, it would make no sense to deny Python this handy tool.

Thank you,

Randy McGregor

0 Kudos
10 Replies
by Anonymous User
Not applicable

This worked:

# Process: Trace Geometric Network
arcpy.AddMessage("> Downstream Trace...")
dstg = "Downstream_Trace_Group"
arcpy.TraceGeometricNetwork_management(Geometric_Network, dstg, poe_copy, "TRACE_DOWNSTREAM", "", "", "", "", "", "NO_TRACE_ENDS", "NO_TRACE_INDETERMINATE_FLOW", "", "", "AS_IS", "", "", "", "AS_IS")

arcpy.CopyFeatures_management(dstg+"\\NHDFLowline","c:\\scratch\\scratch.gdb\\test")

Appears to much simpler a problem to solve than I feared.