Select to view content in your preferred language

Not able to get trace tool output in pycharm

325
1
05-25-2023 12:52 AM
kumarprince8071
New Contributor III

I am running the arcgis pro utility network Trace tool in pycharm and storing the results in a variable but from that variable i am not getting the traced features, any suggestions how will i get the traced features.

 

import arcpy
gdb = "some_gdb"
arcpy.env.workspace = gdb
fds = arcpy.ListDatasets("*", "Feature")
results = arcpy.un.Trace()
for i in results:
print(i)
kumarprince8071_0-1685001099511.png

I am getting results like this any suggestions how will i get the traced features.

Tags (3)
0 Kudos
1 Reply
Clubdebambos
Occasional Contributor III

The results are the paths to the feature classes. You can use the arcpy.da.SearchCursor() to iterate through any of the result feature classes to access the attribute table information. 

https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/searchcursor-class.htm 

~ learn.finaldraftmapping.com
0 Kudos