ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / ShrinkParcelsToSeeds(ParcelLayer,SelectionSet) Method
The parcel fabric layer.
The source layers and feature OIDs of parcel polygons.
Example Version

ShrinkParcelsToSeeds(ParcelLayer,SelectionSet) Method
Shrink selected parcels to seeds.
Syntax

Parameters

parcelLayer
The parcel fabric layer.
sourceFeatures
The source layers and feature OIDs of parcel polygons.
Exceptions
ExceptionDescription
ParcelLayer, sourceFeatures, recordGuid cannot be null.
Insufficient license. This method requires a standard license.
Example
Shrink parcels to seeds
string errorMessage = await QueuedTask.Run(async () =>
{
  var myParcelFabricLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();
  if (myParcelFabricLayer == null)
    return "Please add a parcel fabric to the map";
  try
  {
    FeatureLayer parcelPolygonLyr = null;
    //find the first layer that is a polygon parcel type, is non-historic, and has a selection
    bool bFound = false;
    var ParcelTypesEnum = await myParcelFabricLayer.GetParcelTypeNamesAsync();
    foreach (FeatureLayer mapFeatLyr in MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>())
    {
      foreach (string ParcelType in ParcelTypesEnum)
      {
        var layerEnum = await myParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync(ParcelType);
        foreach (FeatureLayer flyr in layerEnum)
        {
          if (flyr == mapFeatLyr)
          {
            bFound = mapFeatLyr.SelectionCount > 0;
            parcelPolygonLyr = mapFeatLyr;
            break;
          }
        }
        if (bFound) break;
      }
      if (bFound) break;
    }
    if (!bFound)
      return "Please select parcels to shrink to seeds.";
    var editOper = new EditOperation()
    {
      Name = "Shrink Parcels To Seeds",
      ProgressMessage = "Shrink Parcels To Seeds...",
      ShowModalMessageAfterFailure = true,
      SelectNewFeatures = true,
      SelectModifiedFeatures = false
    };
    var ids = new List<long>(parcelPolygonLyr.GetSelection().GetObjectIDs());
    var sourceParcelFeatures = new Dictionary<MapMember, List<long>>();
    sourceParcelFeatures.Add(parcelPolygonLyr, ids);
    editOper.ShrinkParcelsToSeeds(myParcelFabricLayer, SelectionSet.FromDictionary(sourceParcelFeatures));
    if (!editOper.Execute())
      return editOper.ErrorMessage;
  }
  catch (Exception ex)
  {
    return ex.Message;
  }
  return "";
});
if (!string.IsNullOrEmpty(errorMessage))
  MessageBox.Show(errorMessage, "Shrink Parcels To Seeds.");
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also