After reading through various documentation and searching the Community board, I have yet to find a summary that thoroughly explains - with full examples - what's possible for bulk tracing a UN.
I'm on Enterprise 11.3, UN version 7, Pro 3.3.3.
My goal is to use either Python API or ArcPy for the following:
While looping through each of our water UN's ~77,000 line features...
Benefits of this approach:
What works, what doesn't, where I lack knowledge:
Before going into specifics, my frustration is centered around the fact that it's hard to find a method that allows me to dynamically define my starting point (as a mid-point of each water main) for each iteration and then retrieve results in memory...preferably while running against a no dirty area version that is free from interruptions.
In ArcPy I cannot seem to reference a version other than SDE.Default. I've tried appending syntax like this "?gdbversion=MyUser@Domain.TraceTesting" (both with and without forward slash before the "?") to the URL for the UN layer, but it doesn't seem to take.
TraceLocations = [{
"traceLocationType": "startingPoint",
"globalId": GlobalID, ## example: "{288D22C3-301A-44D1-81BA-E66F094413D9}"
}]
traceConfiguration = {
"includeContainers": True,
"includeContent": False,
"includeStructures": False,
"includeBarriers": True,
...etc.
}
resultTypes=[{"type":"elements","includeGeometry":False,"includePropagatedValues":False,"networkAttributeNames":[],"diagramTemplateName":"",
"resultTypeFields":[]}]
trace_results = UtilNetMgr.trace(locations=TraceLocations, trace_type="isolation", configuration=traceConfiguration, result_types=resultTypes)
It's supposed to produce a dictionary with {"traceResults": {"elements": list,}"success": bool}
Here's how it looks when my trace completes. With all the variations I've tried, I never see "traceResults" or "elements" returned.
---------------
Here's my strategy to be most efficient: Instead of having to trace all 77,000 features, what I'll actually trace will be much less - perhaps as little as 1/10 of this total. For each line traced, I'm capturing all the lines being isolated from that run. Therefore, I already know that full group of lines is covered by a certain combination of barriers (valves). So I can then insert all those rows into my SQL table before moving on to a new isolation area, if that makes sense. I really just need to trace one line segment for each isolation area/group. It could entail 2 lines total or it could entail 18 lines, but it cuts down on a lot of processing.
Solved! Go to Solution.
@Andy_Morgan You can mitigate the risks of pressure zone boundaries breaking if you have editors work in a version, instead of defaulting directly, and ensure they validate all their dirty areas, fix all their edits, and trace or update their subnetworks before posting their versions. This will flag any inconsistent subnetworks before they are posted to default and become everyone's problem.
Right, definitely an important workflow for editors. While that's applicable for typical edits to lines and valves, sometimes a pressure plane expansion could mean a slow motion updating of features as the construction project and engineering discussions go on for weeks or months. In such rare cases where a broken boundary in GIS is going to be intentional (and of course temporary), I suppose we could create a no-edit/static version on the side before breaking the boundaries -- a snapshot while the pressure planes are still sealed -- and use it for re-tracing if an updated bulk trace was needed.
Hopefully there wouldn't be a need to run an isolation trace for that small expansion/modification area under construction, but otherwise for everywhere else at least this once again shows the value of having a pre-traced system that you don't have to worry about the Default version having issues at any given moment.