C3DO-0727 · 261101 boundary through the IPS points done
Fixes C3DO-0725: the bold 0.35 outer boundary (polyline 214A8, C-PROP-BNDY) goes through the four iron pins SET - IPS 522 (SW), 521 (NW), 523 (NE), 520 (SE) - instead of the found pins I wrongly used. Same polyline, vertices moved.
C# payload
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
var xy=new System.Collections.Generic.Dictionary<uint,Point2d>();
foreach(ObjectId id in CivilDoc.CogoPoints){ var p=(Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id,OpenMode.ForRead); if(p.RawDescription.Trim().ToUpper()=="IPS") xy[p.PointNumber]=new Point2d(p.Easting,p.Northing); }
Log("IPS points: "+string.Join(", ",xy.Keys));
var order=new uint[]{522,521,523,520}; // SW, NW, NE, SE
foreach(var n in order) if(!xy.ContainsKey(n)){ Log("IPS "+n+" missing - nothing done"); return; }
if(xy.Count!=4){ Log("expected 4 IPS points, found "+xy.Count+" - nothing done"); return; }
Polyline pl=null; foreach(ObjectId id in ms){ var e=Tx.GetObject(id,OpenMode.ForRead) as Polyline; if(e!=null&&e.Handle.ToString()=="214A8") pl=e; }
if(pl==null){ Log("boundary 214A8 not found - nothing done"); return; }
pl.UpgradeOpen();
for(int i=0;i<4;i++){ var o=pl.GetPoint2dAt(i); pl.SetPointAt(i,xy[order[i]]); Log(" vertex "+(i+1)+" -> IPS "+order[i]+" (moved "+o.GetDistanceTo(xy[order[i]]).ToString("F2")+" ft)"); }
var c=(Polyline)Tx.GetObject(pl.ObjectId,OpenMode.ForRead);
for(int i=0;i<4;i++){ var a=c.GetPoint2dAt(i); var b=c.GetPoint2dAt((i+1)%4); Log(" side "+(i+1)+": "+a.GetDistanceTo(b).ToString("F2")+" ft"); }
Log("boundary 214A8 now through all four IPS: closed="+c.Closed+" lineweight="+c.LineWeight+" area "+c.Area.ToString("F0")+" sf / "+(c.Area/43560).ToString("F3")+" ac (verified)");
Ed.Regen();
Result
Log
IPS points: 520, 521, 522, 523 vertex 1 -> IPS 522 (moved 2.18 ft) vertex 2 -> IPS 521 (moved 0.78 ft) vertex 3 -> IPS 523 (moved 0.00 ft) vertex 4 -> IPS 520 (moved 16.91 ft) side 1: 174.07 ft side 2: 267.80 ft side 3: 164.04 ft side 4: 264.09 ft boundary 214A8 now through all four IPS: closed=True lineweight=LineWeight035 area 44809 sf / 1.029 ac (verified)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.