ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.Parcels Namespace / ParcelFabric Class
Members Example

In This Topic
    ParcelFabric Class
    In This Topic
    Represents a parcel fabric.
    Object Model
    ParcelFabric ClassDatastore ClassParcelFabricDefinition ClassTopology ClassTable Class
    Syntax
    public sealed class ParcelFabric : ArcGIS.Core.Data.Dataset, System.IDisposable  
    Public NotInheritable Class ParcelFabric 
       Inherits ArcGIS.Core.Data.Dataset
       Implements System.IDisposable 
    Remarks
    This class is used to
    • Get parcel fabric related classes
    • This class is used to Create and delete parcel types
    • Get parcel topology
    • Get other parcel fabric classes Objects
    Objects of this class are obtained by calling ArcGIS.Core.Data.Geodatabase.OpenDataset<T>
    Example
    Get parcel fabric dataset controller from parcel layer
    string errorMessage = await QueuedTask.Run(() =>
    {
      try
      {
        var myParcelFabricLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();
        //if there is no fabric in the map then bail
        if (myParcelFabricLayer == null)
          return "There is no fabric in the map.";
        var myParcelFabricDataset = myParcelFabricLayer.GetParcelFabric();
      }
      catch (Exception ex)
      {
        return ex.Message;
      }
      return "";
    });
    if (!string.IsNullOrEmpty(errorMessage))
      MessageBox.Show(errorMessage, "Get Parcel Fabric Dataset from layer.");
    Get parcel topology of parcel fabric dataset
    string errorMessage = await QueuedTask.Run(() =>
    {
      try
      {
        var myParcelFabricLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();
        //if there is no fabric in the map then bail
        if (myParcelFabricLayer == null)
          return "There is no fabric in the map.";
        var myParcelFabricDataset = myParcelFabricLayer.GetParcelFabric();
        var myTopology = myParcelFabricDataset.GetParcelTopology();
      }
      catch (Exception ex)
      {
        return ex.Message;
      }
      return "";
    });
    if (!string.IsNullOrEmpty(errorMessage))
      MessageBox.Show(errorMessage, "Get Parcel Fabric Topology.");
    Get parcel fabric from table
    public static ParcelFabric GetParcelFabricFromTable(Table table)
    {
      ParcelFabric myParcelFabricDataset = null;
      if (table.IsControllerDatasetSupported())
      {
        // Tables can belong to multiple controller datasets, but at most one of them will be a parcel fabric
    
        IReadOnlyList<Dataset> controllerDatasets = table.GetControllerDatasets();
        foreach (Dataset controllerDataset in controllerDatasets)
        {
          if (controllerDataset is ParcelFabric)
          {
            myParcelFabricDataset = controllerDataset as ParcelFabric;
          }
          else
          {
            controllerDataset.Dispose();
          }
        }
      }
      return myParcelFabricDataset;
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Dataset
             ArcGIS.Core.Data.Parcels.ParcelFabric

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also