Hi, I've created a tool that selects some layers by attribute and others by location, then in the end it makes a Trace Geometric Network. When I run the tool by "Edit Mode" everything is okay , the group layer is created and added to the map.
But when I export the python script (because I need to modify it later) and just copy and paste it inside the python window of geoprocessing section, it breaks at the final step, the Trace Geometric Network, with the error: "Failed to execute. Parameters are not valid. ERROR 000366: Invalid geometry type Failed to execute (TraceGeometricNetwork)."
This is the last line of the script, that throws the error:
# Process: Trace Geometric Network
arcpy.TraceGeometricNetwork_management(RETEAD_BT_Net__2_, GruppoCS_75460, Interruttori_BT__2_, "FIND_CONNECTED", "", "", "", "", "", "NO_TRACE_ENDS", "NO_TRACE_INDETERMINATE_FLOW", "", "", "AS_IS", "", "", "", "AS_IS")