stringerrorMessage=awaitQueuedTask.Run(()=>{try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}vartheActiveRecord=myParcelFabricLayer.GetActiveRecord();if(theActiveRecord==null){return"There is no Active Record. Please set the active record and try again.";}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Get Active Record.");}
Set the active record
stringerrorMessage=awaitQueuedTask.Run(async()=>{try{stringsExistingRecord="MyRecordName";varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}boolbSuccess=awaitmyParcelFabricLayer.SetActiveRecordAsync(sExistingRecord);if(!bSuccess){return"No record called "+sExistingRecord+" was found.";}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Set Active Record.");}
Create a new record
stringerrorMessage=awaitQueuedTask.Run(async()=>{Dictionary<string,object>RecordAttributes=[];stringsNewRecord="MyRecordName";try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}varrecordsLayer=awaitmyParcelFabricLayer.GetRecordsLayerAsync();vareditOper=newEditOperation(){Name="Create Parcel Fabric Record",ProgressMessage="Create Parcel Fabric Record...",ShowModalMessageAfterFailure=true,SelectNewFeatures=false,SelectModifiedFeatures=false};RecordAttributes.Add("Name",sNewRecord);vareditRowToken=editOper.Create(recordsLayer.FirstOrDefault(),RecordAttributes);if(!editOper.Execute()){returneditOper.ErrorMessage;}vardefOID=-1;varlOid=editRowToken.ObjectID??defOID;awaitmyParcelFabricLayer.SetActiveRecordAsync(lOid);}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Create New Record.");}
Copy standard line features into a parcel type
stringerrorMessage=awaitQueuedTask.Run(async()=>{// check for selected layerif(mapView.GetSelectedLayers().Count==0){return"Please select a target parcel polygon layer in the table of contents.";}//get the feature layer that's selected in the table of contentsvardestPolygonL=mapView.GetSelectedLayers().OfType<FeatureLayer>().FirstOrDefault();try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}varpRec=myParcelFabricLayer.GetActiveRecord();if(pRec==null){return"There is no Active Record. Please set the active record and try again.";}stringParcelTypeName="";IEnumerable<string>parcelTypeNames=awaitmyParcelFabricLayer.GetParcelTypeNamesAsync();foreach(stringparcelTypeNminparcelTypeNames){varpolygonLyrParcelTypeEnum=awaitmyParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync(parcelTypeNm);foreach(FeatureLayerlyrinpolygonLyrParcelTypeEnum){if(lyr==destPolygonL){ParcelTypeName=parcelTypeNm;break;}}}if(String.IsNullOrEmpty(ParcelTypeName)){return"Please select a target parcel polygon layer in the table of contents.";}varsrcFeatLyr=activeMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(l =>l.Name.Contains("MySourceLines")&&l.IsVisible);if(srcFeatLyr==null){return"Looking for a layer named 'MySourceLines' in the table of contents.";}//now get the line layer for this parcel typevardestLineLyrEnum=awaitmyParcelFabricLayer.GetParcelLineLayerByTypeNameAsync(ParcelTypeName);if(destLineLyrEnum.Count==0)//make sure there is one in the map{returnParcelTypeName+" not found.";}vardestLineL=destLineLyrEnum.FirstOrDefault();if(destLineL==null||destPolygonL==null){return"";}vareditOper=newEditOperation(){Name="Copy Line Features To Parcel Type",ProgressMessage="Copy Line Features To Parcel Type...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};varids=newList<long>((srcFeatLyrasFeatureLayer).GetSelection().GetObjectIDs());if(ids.Count==0){return"No selected lines were found. Please select line features and try again.";}editOper.CopyLineFeaturesToParcelType(srcFeatLyr,ids,destLineL,destPolygonL);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Copy Line Features To Parcel Type.");}
Copy parcel lines to a parcel type
stringerrorMessage=awaitQueuedTask.Run(async()=>{// check for selected layerif(mapView.GetSelectedLayers().Count==0){return"Please select a source parcel polygon feature layer in the table of contents.";}try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();if(myParcelFabricLayer==null){return"No parcel layer found in the map.";}//get the feature layer that's selected in the table of contentsvarsrcParcelFeatLyr=mapView.GetSelectedLayers().OfType<FeatureLayer>().FirstOrDefault();stringsTargetParcelType="Tax";vardestLineLEnum=awaitmyParcelFabricLayer.GetParcelLineLayerByTypeNameAsync(sTargetParcelType);if(destLineLEnum.Count==0){return"";}vardestLineL=destLineLEnum.FirstOrDefault();vardestPolygonLEnum=awaitmyParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync(sTargetParcelType);if(destPolygonLEnum.Count==0){return"";}vardestPolygonL=destPolygonLEnum.FirstOrDefault();if(destLineL==null||destPolygonL==null){return"";}vartheActiveRecord=myParcelFabricLayer.GetActiveRecord();if(theActiveRecord==null){return"There is no Active Record. Please set the active record and try again.";}vareditOper=newEditOperation(){Name="Copy Lines To Parcel Type",ProgressMessage="Copy Lines To Parcel Type ...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};varids=newList<long>(srcParcelFeatLyr.GetSelection().GetObjectIDs());if(ids.Count==0){return"No selected parcels found. Please select parcels and try again.";}//add the standard feature line layers source, and their feature ids to a new DictionaryvarsourceParcelFeatures=newDictionary<MapMember,List<long>>{{srcParcelFeatLyr,ids}};editOper.CopyParcelLinesToParcelType(myParcelFabricLayer,SelectionSet.FromDictionary(sourceParcelFeatures),destLineL,destPolygonL,true,false,true);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Copy Parcel Lines To Parcel Type.");}
Assign features to active record
stringerrorMessage=awaitQueuedTask.Run(()=>{//check for selected layerif(mapView.GetSelectedLayers().Count==0){return"Please select a source feature layer in the table of contents.";}//first get the feature layer that's selected in the table of contentsvarsrcFeatLyr=mapView.GetSelectedLayers().OfType<FeatureLayer>().FirstOrDefault();varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();if(myParcelFabricLayer==null){return"No parcel layer found in the map.";}try{vartheActiveRecord=myParcelFabricLayer.GetActiveRecord();if(theActiveRecord==null){return"There is no Active Record. Please set the active record and try again.";}vareditOper=newEditOperation(){Name="Assign Features to Record",ProgressMessage="Assign Features to Record...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};//add parcel type layers and their feature ids to a new Dictionaryvarids=newList<long>(srcFeatLyr.GetSelection().GetObjectIDs());varsourceFeatures=newDictionary<MapMember,List<long>>{{srcFeatLyr,ids}};editOper.AssignFeaturesToRecord(myParcelFabricLayer,SelectionSet.FromDictionary(sourceFeatures),theActiveRecord);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Assign Features To Record.");}
Create parcel seeds
try{vartheActiveRecord=myParcelFabricLayer.GetActiveRecord();if(theActiveRecord==null){return"There is no Active Record. Please set the active record and try again.";}varguid=theActiveRecord.Guid;vareditOper=newEditOperation(){Name="Create Parcel Seeds",ProgressMessage="Create Parcel Seeds...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};editOper.CreateParcelSeedsByRecord(myParcelFabricLayer,guid,mapView.Extent);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";
Build parcels
try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();if(myParcelFabricLayer==null){return"Parcel layer not found in map.";}vartheActiveRecord=myParcelFabricLayer.GetActiveRecord();varguid=theActiveRecord.Guid;vareditOper=newEditOperation(){Name="Build Parcels",ProgressMessage="Build Parcels...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=true};editOper.BuildParcelsByRecord(myParcelFabricLayer,guid);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";
Duplicate parcels
varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();if(myParcelFabricLayer==null){return"Parecl layer not found in the map.";}//get the source polygon layer from the parcel fabric layer type, in this case a layer called LotvarsrcFeatLyrEnum=awaitmyParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync("Lot");if(srcFeatLyrEnum.Count==0){return"";}varsourcePolygonL=srcFeatLyrEnum.FirstOrDefault();//get the target polygon layer from the parcel fabric layer type, in this case a layer called TaxvartargetFeatLyrEnum=awaitmyParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync("Tax");if(targetFeatLyrEnum.Count==0){return"";}vartargetFeatLyr=targetFeatLyrEnum.FirstOrDefault();varids=newList<long>(sourcePolygonL.GetSelection().GetObjectIDs());if(ids.Count==0){return"No selected parcels found. Please select parcels and try again.";}//add polygon layers and the feature ids to be duplicated to a new DictionaryvarsourceFeatures=newDictionary<MapMember,List<long>>{{sourcePolygonL,ids}};try{vartheActiveRecord=myParcelFabricLayer.GetActiveRecord();if(theActiveRecord==null){return"There is no Active Record. Please set the active record and try again.";}vareditOper=newEditOperation(){Name="Duplicate Parcels",ProgressMessage="Duplicate Parcels...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};editOper.DuplicateParcels(myParcelFabricLayer,SelectionSet.FromDictionary(sourceFeatures),theActiveRecord,targetFeatLyr);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}
Set parcels historic
stringerrorMessage=awaitQueuedTask.Run(async()=>{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();if(myParcelFabricLayer==null){return"Please add a parcel fabric to the map";}try{FeatureLayerdestPolygonL=null;//find the first layer that is a parcel type, is non-historic, and has a selectionboolbFound=false;varParcelTypesEnum=awaitmyParcelFabricLayer.GetParcelTypeNamesAsync();foreach(FeatureLayermapFeatLyrinactiveMap.GetLayersAsFlattenedList().OfType<FeatureLayer>()){foreach(stringParcelTypeinParcelTypesEnum){varlayerEnum=awaitmyParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync(ParcelType);foreach(FeatureLayerflyrinlayerEnum){if(flyr==mapFeatLyr){bFound=mapFeatLyr.SelectionCount>0;destPolygonL=mapFeatLyr;break;}}if(bFound){break;}}if(bFound){break;}}if(!bFound){return"Please select parcels to set as historic.";}vartheActiveRecord=myParcelFabricLayer.GetActiveRecord();if(theActiveRecord==null){return"There is no Active Record. Please set the active record and try again.";}varids=newList<long>(destPolygonL.GetSelection().GetObjectIDs());//can do multi layer selection but using single per code abovevarsourceFeatures=newDictionary<MapMember,List<long>>{{destPolygonL,ids}};vareditOper=newEditOperation(){Name="Set Parcels Historic",ProgressMessage="Set Parcels Historic...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};editOper.SetParcelHistoryRetired(myParcelFabricLayer,SelectionSet.FromDictionary(sourceFeatures),theActiveRecord);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Set Parcels Historic.");}
Shrink parcels to seeds
stringerrorMessage=awaitQueuedTask.Run(async()=>{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();if(myParcelFabricLayer==null){return"Please add a parcel fabric to the map";}try{FeatureLayerparcelPolygonLyr=null;//find the first layer that is a polygon parcel type, is non-historic, and has a selectionboolbFound=false;varParcelTypesEnum=awaitmyParcelFabricLayer.GetParcelTypeNamesAsync();foreach(FeatureLayermapFeatLyrinactiveMap.GetLayersAsFlattenedList().OfType<FeatureLayer>()){foreach(stringParcelTypeinParcelTypesEnum){varlayerEnum=awaitmyParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync(ParcelType);foreach(FeatureLayerflyrinlayerEnum){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.";}vareditOper=newEditOperation(){Name="Shrink Parcels To Seeds",ProgressMessage="Shrink Parcels To Seeds...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};varids=newList<long>(parcelPolygonLyr.GetSelection().GetObjectIDs());varsourceParcelFeatures=newDictionary<MapMember,List<long>>{{parcelPolygonLyr,ids}};editOper.ShrinkParcelsToSeeds(myParcelFabricLayer,SelectionSet.FromDictionary(sourceParcelFeatures));if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Shrink Parcels To Seeds.");}
Change parcel type
//add polygon layers and the feature ids to change the type on to a new Dictionaryvarids=newList<long>(sourcePolygonL.GetSelection().GetObjectIDs());varsourceFeatures=newDictionary<MapMember,List<long>>{{sourcePolygonL,ids}};try{vareditOper=newEditOperation(){Name="Change Parcel Type",ProgressMessage="Change Parcel Type...",ShowModalMessageAfterFailure=true,SelectNewFeatures=true,SelectModifiedFeatures=false};editOper.ChangeParcelType(myParcelFabricLayer,SelectionSet.FromDictionary(sourceFeatures),targetFeatLyr);if(!editOper.Execute()){returneditOper.ErrorMessage;}}catch(Exceptionex){returnex.Message;}return"";
Get parcel features
stringsReportResult="Polygon Information --"+Environment.NewLine;stringsParcelTypeName="tax";stringerrorMessage=awaitQueuedTask.Run(async()=>{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric layer in the map.";}//first get the parcel type feature layervarparcelPolygonLayers=awaitmyParcelFabricLayer.GetParcelPolygonLayerByTypeNameAsync(sParcelTypeName);varfeatSrcLyr=parcelPolygonLayers.FirstOrDefault();if(featSrcLyr.SelectionCount==0){return"There is no selection on the "+sParcelTypeName+" layer.";}sReportResult+=" Parcel Type: "+sParcelTypeName+Environment.NewLine;sReportResult+=" Polygons: "+featSrcLyr.SelectionCount+Environment.NewLine+Environment.NewLine;try{// ------- get the selected parcels ---------varids=newList<long>((featSrcLyrasFeatureLayer).GetSelection().GetObjectIDs());varsourceParcels=newDictionary<MapMember,List<long>>{{featSrcLyr,ids}};//---------------------------------------------ParcelFeaturesparcFeatures=awaitmyParcelFabricLayer.GetParcelFeaturesAsync(SelectionSet.FromDictionary(sourceParcels));//since we know that we want to report on Tax lines only, and for this functionality// we can use any of the Tax line layer instances (if there happens to be more than one)// we can get the first instance as followsvarparcelLineLayers=awaitmyParcelFabricLayer.GetParcelLineLayerByTypeNameAsync(sParcelTypeName);FeatureLayermyLineFeatureLyr=parcelLineLayers.FirstOrDefault();if(myLineFeatureLyr==null){returnsParcelTypeName+" line layer not found";}varpointLayers=awaitmyParcelFabricLayer.GetPointsLayerAsync();FeatureLayermyPointFeatureLyr=pointLayers.FirstOrDefault();if(myPointFeatureLyr==null){return"fabric point layer not found";}varLineInfo=parcFeatures.Lines;//then get the line information from the parcel features object//... and then do some work for each of the linesintiRadiusAttributeCnt=0;intiDistanceAttributeCnt=0;sReportResult+="Line Information --";foreach(KeyValuePair<string,List<long>>kvpinLineInfo){if(!kvp.Key.Equals(sParcelTypeName,StringComparison.CurrentCultureIgnoreCase)){continue;// ignore any other lines from different parcel types}foreach(longoidinkvp.Value){varinsp=myLineFeatureLyr.Inspect(oid);vardRadius=insp["RADIUS"];vardDistance=insp["DISTANCE"];if(dRadius!=DBNull.Value){iRadiusAttributeCnt++;}if(dDistance!=DBNull.Value){iDistanceAttributeCnt++;}//Polyline poly = (Polyline)insp["SHAPE"];}sReportResult+=Environment.NewLine+" Distance attributes: "+iDistanceAttributeCnt.ToString();sReportResult+=Environment.NewLine+" Radius attributes: "+iRadiusAttributeCnt.ToString();}varPointInfo=parcFeatures.Points;//get the point information from the parcel features object//... and then do some work for each of the pointssReportResult+=Environment.NewLine+Environment.NewLine+"Point Information --";intiFixedPointCnt=0;intiNonFixedPointCnt=0;foreach(longoidinPointInfo){varinsp=myPointFeatureLyr.Inspect(oid);varisFixed=insp["ISFIXED"];if(isFixed==DBNull.Value||(int)isFixed==0){iNonFixedPointCnt++;}else{iFixedPointCnt++;}// var pt = insp["SHAPE"];}sReportResult+=Environment.NewLine+" Fixed Points: "+iFixedPointCnt.ToString();sReportResult+=Environment.NewLine+" Non-Fixed Points: "+iNonFixedPointCnt.ToString();}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Get Parcel Features");}else{MessageBox.Show(sReportResult,"Get Parcel Features");}
Get parcel fabric dataset controller from parcel layer
stringerrorMessage=awaitQueuedTask.Run(()=>{try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}varmyParcelFabricDataset=myParcelFabricLayer.GetParcelFabric();}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Get Parcel Fabric Dataset from layer.");}
Get parcel topology of parcel fabric dataset
stringerrorMessage=awaitQueuedTask.Run(()=>{try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}varmyParcelFabricDataset=myParcelFabricLayer.GetParcelFabric();varmyTopology=myParcelFabricDataset.GetParcelTopology();}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Get Parcel Fabric Topology.");}
Get point, connection, and record feature classes from the parcel fabric dataset
stringerrorMessage=awaitQueuedTask.Run(()=>{try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}varmyParcelFabricDataset=myParcelFabricLayer.GetParcelFabric();FeatureClassmyPointsFC=myParcelFabricDataset.GetSystemTable(SystemTableType.Points)asFeatureClass;FeatureClassmyCoonectionsFC=myParcelFabricDataset.GetSystemTable(SystemTableType.Connections)asFeatureClass;FeatureClassmyRecordsFC=myParcelFabricDataset.GetSystemTable(SystemTableType.Records)asFeatureClass;}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Get point, connection, and record feature classes.");}
Get parcel type feature classes from the parcel fabric dataset
stringerrorMessage=awaitQueuedTask.Run(()=>{try{varmyParcelFabricLayer=activeMap.GetLayersAsFlattenedList().OfType<ParcelLayer>().FirstOrDefault();//if there is no fabric in the map then bailif(myParcelFabricLayer==null){return"There is no fabric in the map.";}stringmyParcelTypeName="Tax";varmyParcelFabricDataset=myParcelFabricLayer.GetParcelFabric();vartypeInfo=myParcelFabricDataset.GetParcelTypeInfo();FeatureClasslineFCType=null;FeatureClasspolyFCType=null;foreach(varinfointypeInfo){if(info.Name.Equals(myParcelTypeName,StringComparison.CurrentCultureIgnoreCase)){lineFCType=info.LineFeatureTableasFeatureClass;polyFCType=info.PolygonFeatureTableasFeatureClass;break;}}}catch(Exceptionex){returnex.Message;}return"";});if(!string.IsNullOrEmpty(errorMessage)){MessageBox.Show(errorMessage,"Get Parcel Type feature classes.");}
varparcelFabricDataset=awaitQueuedTask.Run(()=>{ParcelFabricmyParcelFabricDataset=null;if(table.IsControllerDatasetSupported()){// Tables can belong to multiple controller datasets, but at most one of them will be a parcel fabricIReadOnlyList<Dataset>controllerDatasets=table.GetControllerDatasets();foreach(DatasetcontrollerDatasetincontrollerDatasets){if(controllerDatasetisParcelFabric){myParcelFabricDataset=controllerDatasetasParcelFabric;}else{controllerDataset.Dispose();}}}returnmyParcelFabricDataset;});