Well . . . I sorta got things to work. The logic that follows is about as rigorous as the process for getting my GISP was, but it's seemed to work so far . . . Selecting the parent parcels isn't much of a problem, so I do that by constructing a query from the FIDSet returned by ICadastralJob::EditParcels, thusly (note that there are some values of "-1" in this FIDSet that represent the prodigal child parcels (and that don't select anything) but I only anticipate finding the parent parcels anyway):
private string ParcelDefinitionQuery(IFIDSet ParcelFIDs)
{
try
{
string ParDef = "";
int eachID;
char[] chars = (" OR ").ToCharArray();
for (int i = 0; i <= ParcelFIDs.Count(); i++)
{
ParcelFIDs.Next(out eachID);
if (eachID > 0)
ParDef = ParDef + "OBJECTID = " + eachID.ToString() + " OR ";
}
ParDef = ParDef.TrimEnd(chars);
return ParDef;
}
catch (Exception ex)
{
throw ex;
}
}
Note that the above must be done before the job is committed (before the job object loses its reference to all its parcels)--it gets done when the user clicks "Finish Job." The stuff below must be done later (after those new parcels have appeared in the polygon feature class & been given real FIDs)--I listen for the user to stop editing (which actually happens even when the user clicks "Save Edits" as well as "Stop Editing").Then I create a GeometryBag & fill it with all those parcels, & then use that to perform a spatial filter to find all non-historical parcels whose interiors intersect those of the parents, thusly:
ISpatialFilter pSF = new SpatialFilterClass();
pSF.Geometry = pTotalParent;
pSF.SearchOrder = esriSearchOrder.esriSearchOrderSpatial;
pSF.SpatialRel = esriSpatialRelEnum.esriSpatialRelRelation;
pSF.SpatialRelDescription = "T********"; // Sel parcels whose interiors touch parents' interiors
pSF.WhereClause = "Historical = 0";
pFCursor = tempFC.Search(pSF, false);
And there you have it. I'm still trying to finish debugging this stuff, but I THINK that the code here works. Like I said, it's not very rigorous, and it might not work if your parcel editing workflow is different from ours. My advice to you is to get out of the parcel mapping business. 🙂Have fun,Dan