← Inbox

C3DO-0725 · 261101 outer boundary through the found pins, 0.35 bold done

New closed polyline all the way around Tracts A+B on C-PROP-BNDY, lineweight 0.35: SW = IPF 1/2" RB (pt 243), NE = IPF 1" CTP (pt 334), SE = IPF 1" OTP (pt 330). No pin was found at the NW corner, so it is the intersection of the record west bearing (N01d52m10sW) from 243 and the record north bearing (N85d37m35sE) into 334. 328 (the 88.07 tie pin) and the 329 stake are south of the subject and not corners. Nothing existing is changed.

Script file
C3DO-0725.cs
Target
261101 - 5491 Roswell Rd NE.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


const string LAYER="C-PROP-BNDY";
var lid=EnsureLayer(LAYER,7);
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForWrite);
foreach(ObjectId id in ms){ var e=Tx.GetObject(id,OpenMode.ForRead) as Polyline; if(e!=null&&e.Layer==LAYER&&e.Closed&&e.NumberOfVertices==4&&e.GetPoint2dAt(0).GetDistanceTo(new Point2d(2232335.826,1420451.3711))<0.01){ Log("boundary already drawn ["+e.Handle+"] - nothing done"); return; } }
var civ=CivilDoc; var xy=new System.Collections.Generic.Dictionary<uint,Point2d>();
foreach(ObjectId id in civ.CogoPoints){ var p=(Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id,OpenMode.ForRead); if(p.PointNumber==243||p.PointNumber==334||p.PointNumber==330) xy[p.PointNumber]=new Point2d(p.Easting,p.Northing); }
if(xy.Count!=3){ Log("pins 243/334/330 not all found - nothing done"); return; }
var pl=new Polyline(); pl.SetDatabaseDefaults();
pl.AddVertexAt(0,xy[243],0,0,0);                                   // SW  IPF 1/2" RB
pl.AddVertexAt(1,new Point2d(2232330.1939,1420623.9247),0,0,0);    // NW  no pin: record W bearing from 243 x record N bearing to 334
pl.AddVertexAt(2,xy[334],0,0,0);                                   // NE  IPF 1" CTP
pl.AddVertexAt(3,xy[330],0,0,0);                                   // SE  IPF 1" OTP
pl.Closed=true; pl.LayerId=lid; pl.LineWeight=LineWeight.LineWeight035; pl.LinetypeScale=0.5;
ms.AppendEntity(pl); Tx.AddNewlyCreatedDBObject(pl,true);
var ltr=(LayerTableRecord)Tx.GetObject(lid,OpenMode.ForWrite); ltr.LineWeight=LineWeight.LineWeight035;
var chk=(Polyline)Tx.GetObject(pl.ObjectId,OpenMode.ForRead);
Log("outer boundary on "+LAYER+" ["+chk.Handle+"]: closed="+chk.Closed+" vertices="+chk.NumberOfVertices+" lineweight="+chk.LineWeight+" perimeter "+chk.Length.ToString("F2")+" ft area "+chk.Area.ToString("F0")+" sf / "+(chk.Area/43560).ToString("F3")+" ac (verified)");
for(int i=0;i<4;i++){ var a=chk.GetPoint2dAt(i); var b=chk.GetPoint2dAt((i+1)%4); Log("  side "+(i+1)+": "+a.GetDistanceTo(b).ToString("F2")+" ft"); }
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261101 - Project\261101 - 5491 Roswell Rd NE.dwg
Message
Executed C3DO-0725 (0 entities touched).
Entities
—
Duration
591 ms
Civil 3D
25.0.0.0

Log

outer boundary on C-PROP-BNDY [214A8]: closed=True vertices=4 lineweight=LineWeight035 perimeter 883.03 ft area 46735 sf / 1.073 ac (verified)
  side 1: 172.65 ft
  side 2: 268.01 ft
  side 3: 180.89 ft
  side 4: 261.48 ft

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.