

{
// This routine creates a TraceArgument object and assigns a TraceConfiguration to it
static void CreateTraceArgument()
{
IReadOnlyList<Element> startingPointList = new List<Element>();
// Code to fill in list of starting points goes here...
TraceArgument traceArgument = new TraceArgument(startingPointList);
TraceConfiguration traceConfiguration = new TraceConfiguration();
// Code to fill in trace configuration goes here...
traceArgument.Configuration = traceConfiguration;
}
}
{
// This routine demonstrates how to perform a trace using the digitized direction of features
static void TraceWithDigitizedDirection(UtilityNetwork utilityNetwork, Element startElement)
{
using TraceManager traceManager = utilityNetwork.GetTraceManager();
// Trace configuration with digitized direction
TraceConfiguration traceConfiguration = new TraceConfiguration()
{
IncludeIsolatedFeatures = true,
IncludeBarriersWithResults = true,
UseDigitizedDirection = true
};
// Trace argument
List<Element> startElements = new List<Element> { startElement };
TraceArgument traceArgument = new TraceArgument(startElements);
traceArgument.Configuration = traceConfiguration;
// Results
DownstreamTracer downstreamTracer = traceManager.GetTracer<DownstreamTracer>();
IReadOnlyList<Result> traceResults = downstreamTracer.Trace(traceArgument);
foreach (Result traceResult in traceResults)
{
// Iterate trace results
}
}
}
System.Object
ArcGIS.Core.Data.UtilityNetwork.Trace.TraceConfiguration
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)