C3D-INSP2403H · Find 1.6ac corner monuments from points (read-only) done
Dump corner-like CogoPoints (IPF/IPS/rebar/etc) with number+desc+coords, plus existing 1.22 hero endpoints. To trace the 1.6 lot outline from surveyed points, not guess it.
C# payload
// READ-ONLY: find the 1.6 AC lot's corner monuments from the survey points.
// Dump CogoPoints whose RawDescription looks like a boundary corner (IPF/IPS/IPP/IRF/RBF/CORNER/PK/MAG/
// 1/2"/5/8"/REBAR) with PointNumber, RawDescription, X, Y. Also dump the existing heroed outline
// (SS-BOUNDARY_CYAN, = the 1.22 lot) endpoints again for spatial reference. No writes.
using System;
using System.Linq;
using System.Collections.Generic;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.Civil.ApplicationServices;
using Autodesk.Civil.DatabaseServices;
var db = Db;
var cdoc = CivilDocument.GetCivilDocument(db);
string[] tokens = { "IPF","IPS","IPP","IRF","IRS","RBF","RBS","CORNER","CORN","PK","MAG","REBAR","PIN","1/2","5/8","3/8","CP","POB","POINT OF" };
using (var tr = db.TransactionManager.StartTransaction())
{
var matches = new List<(int num,string desc,double x,double y)>();
foreach (ObjectId id in cdoc.CogoPoints)
{
var cp = tr.GetObject(id, OpenMode.ForRead) as CogoPoint;
if (cp == null) continue;
string raw = (cp.RawDescription ?? "").ToUpperInvariant();
if (string.IsNullOrWhiteSpace(raw)) continue;
if (tokens.Any(t => raw.Contains(t)))
matches.Add(((int)cp.PointNumber, cp.RawDescription, cp.Easting, cp.Northing));
}
Log($"CORNER-LIKE MONUMENTS ({matches.Count}):");
foreach (var m in matches.OrderBy(m=>m.num))
Log($" #{m.num} ({m.x:0.00},{m.y:0.00}) '{m.desc}'");
tr.Commit();
}
// existing 1.22 hero outline for reference
using (var tr = db.TransactionManager.StartTransaction())
{
var ms = (BlockTableRecord)tr.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(db), OpenMode.ForRead);
Log("EXISTING 1.22 HERO (SS-BOUNDARY_CYAN) corner points:");
foreach (ObjectId id in ms)
{
var e = tr.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if (e is Line ln && string.Equals(e.Layer,"SS-BOUNDARY_CYAN",StringComparison.OrdinalIgnoreCase))
Log($" ({ln.StartPoint.X:0.0},{ln.StartPoint.Y:0.0})->({ln.EndPoint.X:0.0},{ln.EndPoint.Y:0.0})");
}
tr.Commit();
}
Result
Log
CORNER-LIKE MONUMENTS (22): #75 (2359559.00,1425603.17) 'IPS' #76 (2359457.38,1425520.95) 'IPS' #100 (2359298.00,1425651.86) 'IPF 1\2 RBF DISTR' #127 (2359422.67,1425793.21) '12 RCP INV' #128 (2359402.86,1425780.51) '12 RCP INV' #151 (2359529.78,1425461.48) 'IPF 1 IN OTP' #155 (2359701.51,1425321.16) 'IPF 1\2 RBF' #162 (2359674.71,1424961.99) 'IPF 1\2 RBF' #164 (2359664.28,1424958.43) 'IPF 1\2 RBF' #192 (2359521.96,1425484.05) '10 MAG' #193 (2359511.26,1425490.92) '10 MAG' #194 (2359504.93,1425502.08) '10 MAG' #470 (2359714.63,1425514.65) '12RCP INV' #681 (2359776.46,1425750.23) 'IPF 1\2 RBF' #7065 (2359700.07,1425320.87) 'IPF' #7067 (2360253.08,1425154.73) 'IPF' #9068 (2359776.34,1425749.60) 'IPF 1\2 RBF' #9069 (2359734.36,1425737.01) 'IPF 1\2 RBF' #9070 (2359682.30,1425777.54) 'IPF' #9071 (2359598.24,1425793.50) 'IPF' #9072 (2359542.92,1425805.75) 'IPF' #9073 (2359375.27,1425745.94) 'IPF' EXISTING 1.22 HERO (SS-BOUNDARY_CYAN) corner points: (2359457.4,1425521.0)->(2359298.0,1425651.9) (2359542.9,1425805.8)->(2359598.2,1425793.5) (2359298.0,1425651.9)->(2359375.3,1425745.9) (2359598.2,1425793.5)->(2359559.0,1425603.2) (2359559.0,1425603.2)->(2359457.4,1425521.0)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.