//add polygon layers and the feature ids to change the type on to a new Dictionary
var ids = new List<long>(sourcePolygonL.GetSelection().GetObjectIDs());
var sourceFeatures = new Dictionary<MapMember, List<long>>
{
{ sourcePolygonL, ids }
};
try
{
var editOper = new EditOperation()
{
Name = "Change Parcel Type",
ProgressMessage = "Change Parcel Type...",
ShowModalMessageAfterFailure = true,
SelectNewFeatures = true,
SelectModifiedFeatures = false
};
editOper.ChangeParcelType(myParcelFabricLayer, SelectionSet.FromDictionary(sourceFeatures), targetFeatLyr);
if (!editOper.Execute())
return editOper.ErrorMessage;
}
catch (Exception ex)
{
return ex.Message;
}
return "";