ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Trace Namespace / FunctionBarrier Class / FunctionBarrier Constructor
The Function that is used to calculate a value.
The Operator that is used to perform the comparison (equals, less than etc.).
The value that the functional expression is compared against.
Example

In This Topic
    FunctionBarrier Constructor
    In This Topic
    Initializes a new instance of the FunctionBarrier class.
    Syntax
    Public Function New( _
       ByVal function As Function, _
       ByVal comparisonOperator As Operator, _
       ByVal value As Double _
    )

    Parameters

    function
    The Function that is used to calculate a value.
    comparisonOperator
    The Operator that is used to perform the comparison (equals, less than etc.).
    value
    The value that the functional expression is compared against.
    Example
    Create a FunctionBarrier
    // 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 };
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also