

{
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.";
string myParcelTypeName = "Tax";
var myParcelFabricDataset = myParcelFabricLayer.GetParcelFabric();
var typeInfo = myParcelFabricDataset.GetParcelTypeInfo();
FeatureClass lineFCType = null;
FeatureClass polyFCType = null;
foreach (var info in typeInfo)
{
if (info.Name.Equals(myParcelTypeName, StringComparison.CurrentCultureIgnoreCase))
{
lineFCType = info.LineFeatureTable as FeatureClass;
polyFCType = info.PolygonFeatureTable as FeatureClass;
break;
}
}
}
catch (Exception ex)
{
return ex.Message;
}
return "";
});
if (!string.IsNullOrEmpty(errorMessage))
MessageBox.Show(errorMessage, "Get Parcel Type feature classes.");
}
System.Object
ArcGIS.Core.Data.Parcels.ParcelTypeInfo
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)