I am relatively new to ESRI geometric networks and working with an electric distribution system model in a file gdb. My goal is to make a python script that generates an export file that our power modeling software WindMil can use. I want to iterate through every feature in our GN and as efficiently as possible determine the immediate upstream feature(s) because each row in the csv export has to have the identifier of the current feature and the id of the immediate upstream feature. I have learned to use arcpy to perform network traces but I see no clear-cut way to get the immediate upstream feature. All I can think of is to find all the features immediately connected to my feature by geometry, then run an upstream trace and check to see what immediately connected features are also in the upstream trace features. This seems inefficient to do 80,000 times. Is there a better way? There probably is something incredibly easy I am just not seeing...
Thanks! Jessica
Solved! Go to Solution.
You could use the attribute assistant. It had from junctions and to junction methods.
Looks like I will have to delve into ArcObjects again as the methods to access adjacent network features don't seem to exist in arcpy.
You could use the attribute assistant. It had from junctions and to junction methods.
Thanks Michael! I didn't know this existing. It looks super promising.