C3D-0135 · Road name + R/W labels (Sweetbriar Ln, Camellia Cir) [ROAD-LABELS] done
Labels both abutting roads on ROAD_TEXT at height 6.0: SWEETBRIAR LN 50' R/W as a single rotated MText, and CAMELLIA CIR 50' R/W as curved text - one MText per character placed along the centreline and rotated to the local tangent. Road names from Regrid, confirmed against centreline bearings; R/W widths derived from the nearest iron pins (24.44/24.87 and 24.93/26.29 half-widths) doubled and snapped to the standard 50 ft.
C# payload
// Road name + right-of-way labels on ROAD_TEXT.
//
// Roads identified from Regrid (app.regrid.com, parcel 13016C E001) and confirmed against the
// drawn centreline geometry: CL_A is straight S21W = SWEETBRIAR LN, CL_B curves S59E->S29E
// (a constant curve = a circle road) = CAMELLIA CIR.
//
// R/W width comes from the nearest iron pin to each centreline, doubled and snapped to a standard
// width (30/40/50/60/70/80/100):
// SWEETBRIAR LN pins 102 (24.44) and 103 (24.87) -> mean half 24.65 -> 49.3 -> 50' R/W
// CAMELLIA CIR pins 100 (24.93) and 103 (26.29) -> mean half 25.61 -> 51.2 -> 50' R/W
// If no pin falls within 40 ft of a centreline the label must read "R/W VARIES" instead.
//
// The curved road gets its text CURVED: one MText per character, positioned along the centreline
// and rotated to the local tangent. The straight road gets a single rotated MText.
// Characters that would read upside-down are flipped 180 degrees.
const string LAYER = "ROAD_TEXT";
const double H = 6.0;
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForWrite);
EnsureLayer(LAYER, 7);
{
var mt = new MText {
Location = new Point3d(2238197.8526, 1325215.0327, 0.0),
Contents = @"SWEETBRIAR LN 50' R/W",
TextHeight = H,
Rotation = -5.075729,
Attachment = AttachmentPoint.MiddleCenter,
};
mt.Layer = LAYER;
ms.AppendEntity(mt); Tx.AddNewlyCreatedDBObject(mt, true);
Log(" SWEETBRIAR LN straight label placed");
}
{
int n = 0;
{ var c = new MText { Location = new Point3d(2238295.8512, 1325225.9108, 0.0), Contents = @"C",
TextHeight = H, Rotation = -0.696269, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238298.7053, 1325223.5249, 0.0), Contents = @"A",
TextHeight = H, Rotation = -0.696269, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238301.5594, 1325221.1391, 0.0), Contents = @"M",
TextHeight = H, Rotation = -0.696269, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238304.4136, 1325218.7532, 0.0), Contents = @"E",
TextHeight = H, Rotation = -0.696269, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238307.2677, 1325216.3673, 0.0), Contents = @"L",
TextHeight = H, Rotation = -0.696269, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238310.1218, 1325213.9815, 0.0), Contents = @"L",
TextHeight = H, Rotation = -0.696269, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238312.9760, 1325211.5956, 0.0), Contents = @"I",
TextHeight = H, Rotation = -0.696269, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238315.8203, 1325209.1992, 0.0), Contents = @"A",
TextHeight = H, Rotation = -0.792437, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238320.9467, 1325203.8123, 0.0), Contents = @"C",
TextHeight = H, Rotation = -0.867289, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238323.3531, 1325200.9755, 0.0), Contents = @"I",
TextHeight = H, Rotation = -0.867289, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238325.7596, 1325198.1387, 0.0), Contents = @"R",
TextHeight = H, Rotation = -0.867289, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238332.9790, 1325189.6284, 0.0), Contents = @"5",
TextHeight = H, Rotation = -0.867289, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238335.3854, 1325186.7916, 0.0), Contents = @"0",
TextHeight = H, Rotation = -0.867289, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238337.7919, 1325183.9548, 0.0), Contents = @"'",
TextHeight = H, Rotation = -0.867289, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238342.4625, 1325178.1664, 0.0), Contents = @"R",
TextHeight = H, Rotation = -0.917049, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238344.7248, 1325175.2135, 0.0), Contents = @"/",
TextHeight = H, Rotation = -0.917049, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
{ var c = new MText { Location = new Point3d(2238346.9872, 1325172.2605, 0.0), Contents = @"W",
TextHeight = H, Rotation = -0.917049, Attachment = AttachmentPoint.MiddleCenter };
c.Layer = LAYER; ms.AppendEntity(c); Tx.AddNewlyCreatedDBObject(c, true); n++; }
Log(" CAMELLIA CIR curved label placed as " + n + " character(s) along the arc");
}
int total = 0;
foreach (ObjectId id in ms) {
var e = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if (e != null && !e.IsErased && e.Layer == LAYER) total++;
}
Log("ROAD_TEXT now holds " + total + " entities (verified)");
Ed.Regen();
Result
Log
SWEETBRIAR LN straight label placed CAMELLIA CIR curved label placed as 17 character(s) along the arc ROAD_TEXT now holds 18 entities (verified)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.