ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ParcelFabricExtensions Class / GetHistoricParcelLineLayerByTypeNameAsync Method
The parcel layer.
The parcel type name to retrieve layers.
Example

In This Topic
    GetHistoricParcelLineLayerByTypeNameAsync Method
    In This Topic
    Gets the historic line layer(s) for the given parcel type name.
    Syntax
    public static Task<List<FeatureLayer>> GetHistoricParcelLineLayerByTypeNameAsync( 
       ParcelLayer parcelLayer,
       string typeName
    )
    Public Shared Function GetHistoricParcelLineLayerByTypeNameAsync( _
       ByVal parcelLayer As ParcelLayer, _
       ByVal typeName As String _
    ) As Task(Of List(Of FeatureLayer))

    Parameters

    parcelLayer
    The parcel layer.
    typeName
    The parcel type name to retrieve layers.

    Return Value

    A Task to the set of historic line layers
    Exceptions
    ExceptionDescription
    Insufficient license. This method requires a standard license.
    Example
    Get parcel type name from feature layer
    private async Task<string> GetParcelTypeNameFromFeatureLayer(ParcelLayer myParcelFabricLayer, FeatureLayer featLayer, GeometryType geomType)
    {
      if (featLayer == null) //nothing to do, return empty string
        return String.Empty;
      IEnumerable<string> parcelTypeNames = await myParcelFabricLayer.GetParcelTypeNamesAsync();
      foreach (string parcelTypeName in parcelTypeNames)
      {
        if (geomType == GeometryType.Polygon)
        {
          var polygonLyrParcelTypeEnum = await myParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync(parcelTypeName);
          foreach (FeatureLayer lyr in polygonLyrParcelTypeEnum)
            if (lyr == featLayer)
              return parcelTypeName;
    
          polygonLyrParcelTypeEnum = await myParcelFabricLayer.GetHistoricParcelPolygonLayerByTypeNameAsync(parcelTypeName);
          foreach (FeatureLayer lyr in polygonLyrParcelTypeEnum)
            if (lyr == featLayer)
              return parcelTypeName;
        }
        if (geomType == GeometryType.Polyline)
        {
          var lineLyrParcelTypeEnum = await myParcelFabricLayer.GetParcelLineLayerByTypeNameAsync(parcelTypeName);
          foreach (FeatureLayer lyr in lineLyrParcelTypeEnum)
            if (lyr == featLayer)
              return parcelTypeName;
    
          lineLyrParcelTypeEnum = await myParcelFabricLayer.GetHistoricParcelLineLayerByTypeNameAsync(parcelTypeName);
          foreach (FeatureLayer lyr in lineLyrParcelTypeEnum)
            if (lyr == featLayer)
              return parcelTypeName;
        }
      }
      return String.Empty;
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also