ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.Parcels Namespace / ParcelFabric Class / GetParcelTopology Method
Example

In This Topic
    GetParcelTopology Method
    In This Topic
    Returns the topology for the parcel fabric. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function GetParcelTopology() As Topology
    public Topology GetParcelTopology()

    Return Value

    The ArcGIS.Core.Data.Topology that is used with this parcel fabric dataset.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    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.");
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also