I want to add multiple selected features into the trace locations using the arcpy.un.AddTraceLocations() method but i am not able to do that I am using this set of code
result = arcpy.management.SelectLayerByAttribute(
in_layer_or_view="ElectricDevice",
selection_type="NEW_SELECTION",
where_clause="ASSETGROUP = 38",
invert_where_clause=None
)
with arcpy.da.SearchCursor(result, "*") as cursor:
for row in cursor:
arcpy.un.AddTraceLocations(
in_utility_network=r"D:\UNM\GDB\Naperville_Electric_2213.gdb\UtilityNetwork\Network",
out_feature_class=feature_class_path,
load_selected_features="LOAD_SELECTED_FEATURES",
clear_trace_locations="KEEP_LOCATIONS",
trace_locations=row,
filter_barrier="TRAVERSABILITY_BARRIER"
)