// Get a NetworkAttribute object for the Load network attribute from the UtilityNetworkDefinition using (NetworkAttribute loadNetworkAttribute = utilityNetworkDefinition.GetNetworkAttribute("Load")) { // Create a function to sum the Load Add sumLoadFunction = new Add(loadNetworkAttribute); // Add this function to our trace configuration traceConfiguration.Functions = new List<Function>() { sumLoadFunction }; }
// Create a NetworkAttribute object for the Shape length network attribute from the UtilityNetworkDefinition using (NetworkAttribute shapeLengthNetworkAttribute = utilityNetworkDefinition.GetNetworkAttribute("Shape length")) { // Create a function that adds up shape length Add lengthFunction = new Add(shapeLengthNetworkAttribute); // Create a function barrier that stops traversal after 1000 feet FunctionBarrier distanceBarrier = new FunctionBarrier(lengthFunction, Operator.GreaterThan, 1000.0); // Set this function barrier traceConfiguration.Traversability.FunctionBarriers = new List<FunctionBarrier>() { distanceBarrier }; }
System.Object
ArcGIS.Core.Data.UtilityNetwork.Trace.Function
ArcGIS.Core.Data.UtilityNetwork.Trace.Add
ArcGIS.Core.Data.UtilityNetwork.Trace.Average
ArcGIS.Core.Data.UtilityNetwork.Trace.Count
ArcGIS.Core.Data.UtilityNetwork.Trace.Max
ArcGIS.Core.Data.UtilityNetwork.Trace.Min
ArcGIS.Core.Data.UtilityNetwork.Trace.Subtract
Target Platforms: Windows 11, Windows 10, Windows 8.1