ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Telecom Namespace / UnitRange Class
Members Example

In This Topic
    UnitRange Class
    In This Topic
    Represents a span of units in container equipment. These can represent ports in a switch or slots in a rack.
    Object Model
    UnitRange ClassUnitIdentifier Class
    Syntax
    Public NotInheritable Class UnitRange 
    public sealed class UnitRange 
    Example
    Query the contents of equipment containers in the utility network
    await QueuedTask.Run(() =>
    {
      using (UnitIdentifierManager unitIdentifierManager = utilityNetwork.GetUnitIdentifierManager())
      {
        var networkSource = utilityNetwork.GetDefinition().GetNetworkSource("TelecomDevice");
    
        // Container to query.
        UnitIdentifier containerUnitId = new UnitIdentifier(networkSource, globalID);
    
        // Query the unit identifiers in the container
        IReadOnlyList<UnitQueryResult> unitQueryResults = unitIdentifierManager.Query(new List<UnitIdentifier> { containerUnitId });
    
        // Iterate through the query results
        foreach (UnitQueryResult unitQueryResult in unitQueryResults)
        {
          UnitIdentifier unitIdentifier = unitQueryResult.Container;
          IReadOnlyList<UnitRange> unitsInAContainer = unitQueryResult.UnitRanges;
    
          // Iterate through the unit ranges (contents) in the container
          foreach (UnitRange unitRange in unitsInAContainer)
          {
            UnitIdentifier contentUnitId = unitRange.Content;
            bool isContentGap = unitRange.IsGap; // True if the content is a gap (empty space reserved for installing a larger piece of equipment).
            short? firstUnit = unitRange.FirstUnit;
            short? lastUnit = unitRange.LastUnit;
          }
        }
      }
    
    });
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Data.UtilityNetwork.Telecom.UnitRange

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.7 or higher.
    See Also