C3D-260619-R5713 · Redline 5,7,13 - power line, adjoiner DB/PG, septic note done
Draws the overhead power line through the surveyed PP/OHP points using the POWER_LINE linetype with a label; adds a DB/PG placeholder for Thomas & White (the only adjoiner missing one); adds a sewage-disposal/water-supply note flagging that no septic tank or drainfield was located by this survey.
C# payload
// REDLINE #5, #7, #13.
// #5 Overhead power line - the POWER_LINE linetype ("----P----P----") is already loaded in
// this drawing. Draws a polyline through the surveyed PP / OHP points along the Stonewall
// Tell frontage and applies that linetype, plus an "OVERHEAD POWER LINE" label.
// #7 Adjoiner deed references. MNSF II W1 LLC (DB 51448 PG 269), McAulay/Groce (DB 52044
// PG 322), Powell (DB 28196 PG 23) and Vaughan (DB 30326 PG 474) ALREADY carry DB/PG on
// the drawing - only Thomas & White lacks one, so a placeholder block is added for it.
// #13 No septic tank or drainfield points exist in the survey data, so a sewage-disposal /
// water-supply note is added with the location flagged as to-be-verified.
// Model space, model units (1 paper inch = 60 model units at the sheet viewport scale).
// ADDS ONLY. Host owns Tx; host regens after commit.
const string LAY_PWR = "SS-POWER", LAY_NOTE = "C-ANNO";
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForWrite);
EnsureLayer(LAY_PWR, 7);
EnsureLayer(LAY_NOTE, 7);
// ---- #5 overhead power line ----
var ltt = (LinetypeTable)Tx.GetObject(Db.LinetypeTableId, OpenMode.ForRead);
ObjectId ltId = ObjectId.Null;
if (ltt.Has("POWER_LINE")) ltId = ltt["POWER_LINE"];
var pwr = new Polyline();
var ppts = new Point2d[] { new Point2d(2166722.76, 1329911.35), new Point2d(2166731.05, 1329949.57), new Point2d(2166776.73, 1330144.92), new Point2d(2166821.35, 1330338.2), new Point2d(2166865.7, 1330529.47), new Point2d(2166871.62, 1330555.84) };
for (int i = 0; i < ppts.Length; i++) pwr.AddVertexAt(i, ppts[i], 0, 0, 0);
pwr.Layer = LAY_PWR;
if (!ltId.IsNull) pwr.LinetypeId = ltId;
pwr.LinetypeScale = 40.0;
ms.AppendEntity(pwr);
Tx.AddNewlyCreatedDBObject(pwr, true);
Log("power line: " + ppts.Length + " vertices, length " + pwr.Length.ToString("F1") +
", linetype " + (ltId.IsNull ? "NOT FOUND" : "POWER_LINE"));
var plbl = new MText {
Location = new Point3d(ppts[ppts.Length/2].X + 25.0, ppts[ppts.Length/2].Y, 0.0),
Contents = "OVERHEAD POWER LINE",
TextHeight = 4.0,
Attachment = AttachmentPoint.MiddleLeft,
};
plbl.Layer = LAY_PWR;
ms.AppendEntity(plbl);
Tx.AddNewlyCreatedDBObject(plbl, true);
// ---- #7 + #13 notes ----
var notes = new (double x, double y, double h, double w, string t)[] {
(2166300.0, 1330450.0, 3.0, 60.0, @"SEWAGE DISPOSAL / WATER SUPPLY NOTE:\PWATER SUPPLY: PUBLIC (STATE / COMMUNITY SYSTEM).\PSEWAGE DISPOSAL: INDIVIDUAL ON-SITE SEPTIC SYSTEM.\PTHE EXISTING SEPTIC TANK AND DRAINFIELD SERVING THE\PIMPROVEMENTS ON TRACT ""A"" WERE NOT LOCATED BY THIS\PSURVEY. LOCATION TO BE FIELD VERIFIED AND SHOWN, AND\PTHE NEW PROPERTY LINE CONFIRMED TO CLEAR THE TANK,\PDRAINFIELD AND REQUIRED SETBACKS, PRIOR TO RECORDING.\PSUBJECT TO VERIFICATION BY FULTON COUNTY\PENVIRONMENTAL HEALTH."),
(2166520.0, 1331010.0, 3.0, 40.0, @"N/F LATISSA NECOLE THOMAS\P& DANIEL WEBSTER WHITE\PJANUARY 30, 2001\PDB ______ - PG ______\P(DEED REFERENCE TO BE ADDED)")
};
foreach (var n in notes)
{
var mt = new MText {
Location = new Point3d(n.x, n.y, 0.0),
Contents = n.t,
TextHeight = n.h,
Width = n.w,
Attachment = AttachmentPoint.TopLeft,
};
mt.Layer = LAY_NOTE;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
Log("note at (" + n.x.ToString("F0") + "," + n.y.ToString("F0") + ") h=" + n.h + " handle=" + mt.Handle);
}
Log("Redline #5 power line, #7 Thomas/White deed placeholder, #13 septic note - added.");
Result
Log
power line: 6 vertices, length 661.5, linetype POWER_LINE note at (2166300,1330450) h=3 handle=22ADB note at (2166520,1331010) h=3 handle=22ADC Redline #5 power line, #7 Thomas/White deed placeholder, #13 septic note - added.
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.