C3D-IPF619 · Find IPF points done
C# payload
// Read-only: find IPF (iron pin found) cogo points, list coords + pairwise distances.
var cd = CivilDoc;
var cps = cd.CogoPoints;
var found = new List<(uint num, double e, double n, string desc)>();
foreach (ObjectId id in cps) {
var cp = (Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id, OpenMode.ForRead);
var d = (cp.RawDescription ?? "").ToUpperInvariant();
if (d.Contains("IPF") || d.Contains("IRON")) found.Add((cp.PointNumber, cp.Easting, cp.Northing, cp.RawDescription));
}
Log($"IPF-type points: {found.Count}");
foreach (var f in found) Log($" #{f.num} ({f.e:F3}, {f.n:F3}) '{f.desc}'");
Log("-- pairwise distances --");
for (int i = 0; i < found.Count; i++)
for (int j = i + 1; j < found.Count; j++) {
double dx = found[i].e - found[j].e, dy = found[i].n - found[j].n;
Log($" #{found[i].num}<->#{found[j].num}: {System.Math.Sqrt(dx*dx+dy*dy):F2}'");
}
Log("IPF recon complete (read-only).");
Result
Log
IPF-type points: 3 #478 (2166609.127, 1330752.555) 'IPF 2 IN OTP' #479 (2166608.698, 1330889.775) 'IPF 2 IN OTP' #506 (2166529.849, 1330757.405) 'IPF 1 IN CTP' -- pairwise distances -- #478<->#479: 137.22' #478<->#506: 79.43' #479<->#506: 154.07' IPF recon complete (read-only).
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.