private void TraceUtilityNetworkUsingNamedTraceConfiguration(UtilityNetwork utilityNetwork, NamedTraceConfiguration namedTraceConfiguration, Element startElement)
{
// Get the trace manager from the utility network
using (TraceManager traceManager = utilityNetwork.GetTraceManager())
{
// Get a tracer from the trace manager using the named trace configuration
Tracer upstreamTracer = traceManager.GetTracer(namedTraceConfiguration);
// Trace argument holding the trace input parameters
TraceArgument upstreamTraceArgument = new TraceArgument(namedTraceConfiguration, new List<Element> {startElement});
// Trace results
IReadOnlyList<Result> upstreamTraceResults = upstreamTracer.Trace(upstreamTraceArgument);
}
}