ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Telecom Namespace / UnitIdentifierManager Class / ReserveUnitIDs Method
Represents an equipment container (UnitIdentifier), such as a rack or a switch.
Represents the first unit in the gap range to reserve.
Represents the last unit in the gap range to reserve.
Example

In This Topic
    ReserveUnitIDs Method
    In This Topic
    Reserves a range to create a gap in the unit range UnitRange space of an equipment container. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub ReserveUnitIDs( _
       ByVal container As UnitIdentifier, _
       ByVal firstUnit As Short, _
       ByVal lastUnit As Short _
    ) 
    public void ReserveUnitIDs( 
       UnitIdentifier container,
       short firstUnit,
       short lastUnit
    )

    Parameters

    container
    Represents an equipment container (UnitIdentifier), such as a rack or a switch.
    firstUnit
    Represents the first unit in the gap range to reserve.
    lastUnit
    Represents the last unit in the gap range to reserve.
    Exceptions
    ExceptionDescription
    This operation cannot be invoked inside ArcGIS.Core.Data.Geodatabase.ApplyEdits or when an edit operation is in progress.
    A geodatabase-related exception has occurred.
    Example
    Reserve a gap in an equipment container in the utility network
    await QueuedTask.Run(() =>
    {
      using (UnitIdentifierManager unitIdentifierManager = utilityNetwork.GetUnitIdentifierManager())
      {
        var networkSource = utilityNetwork.GetDefinition().GetNetworkSource("TelecomDevice");
        UnitIdentifier containerUnitIdentifier = new UnitIdentifier(networkSource, globalID);
    
        // Reserve a gap in the container for units 2 through 5.
        unitIdentifierManager.ReserveUnitIDs(containerUnitIdentifier, 2, 5);
      }
    });
    Requirements

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

    ArcGIS Pro version: 3.7 or higher.
    See Also