C3D-0012 · Manhole invert notes [MH-NOTES] done
Adds 14 manhole notes on SEWER_LINE_TEXT in the MH/RIM/IN/OUT format with leaders to the surveyed points. Values from 260613_invert_v2.csv; N/A where no invert was recorded.
C# payload
// Manhole invert notes -> SEWER_LINE_TEXT, matching the existing "MH A14" note format:
// MH A14
// RIM 734.14
// IN 722.02
// OUT 721.82
// with a leader from the note back to the surveyed manhole point.
//
// Values come from 260613_invert_v2.csv (RIM_F3 / INVERT_IN / INVERT_OUT). Where the CSV has no
// invert recorded the line reads N/A per the user - nothing is inferred or interpolated.
// Coordinates are the surveyed manhole points read out of this drawing, not from the CSV.
// Notes are offset 18.0 ft NE of the point so they clear the symbol; the user moves them.
// Host owns Tx; host regens after commit.
const string LAYER = "SEWER_LINE_TEXT";
const double H = 4.0;
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForWrite);
EnsureLayer(LAYER, 3);
{
var mt = new MText {
Location = new Point3d(2296397.85, 1279971.52, 0.0),
Contents = @"MH A16\PRIM 751.17\PIN N/A\POUT N/A",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296379.85, 1279953.52, 0.0));
ld.AppendVertex(new Point3d(2296397.85, 1279971.52, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 473 " + @"MH A16\PRIM 751.17\PIN N/A\POUT N/A".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296529.25, 1279969.45, 0.0),
Contents = @"MH A14\PRIM 734.14\PIN 722.02\POUT 721.82",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296511.25, 1279951.45, 0.0));
ld.AppendVertex(new Point3d(2296529.25, 1279969.45, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 424 " + @"MH A14\PRIM 734.14\PIN 722.02\POUT 721.82".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296622.65, 1280064.20, 0.0),
Contents = @"MH A12\PRIM 727.40\PIN N/A\POUT N/A",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296604.65, 1280046.20, 0.0));
ld.AppendVertex(new Point3d(2296622.65, 1280064.20, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 377 " + @"MH A12\PRIM 727.40\PIN N/A\POUT N/A".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296669.99, 1280076.10, 0.0),
Contents = @"TEST MH\PRIM 727.72\PIN N/A\POUT N/A",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296651.99, 1280058.10, 0.0));
ld.AppendVertex(new Point3d(2296669.99, 1280076.10, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 358 " + @"TEST MH\PRIM 727.72\PIN N/A\POUT N/A".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296703.19, 1280070.35, 0.0),
Contents = @"TEST MH\PRIM 727.68\PIN 718.33\POUT 718.13",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296685.19, 1280052.35, 0.0));
ld.AppendVertex(new Point3d(2296703.19, 1280070.35, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 353 " + @"TEST MH\PRIM 727.68\PIN 718.33\POUT 718.13".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296708.96, 1280063.90, 0.0),
Contents = @"MH A10\PRIM 727.55\PIN 717.37\POUT 717.17",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296690.96, 1280045.90, 0.0));
ld.AppendVertex(new Point3d(2296708.96, 1280063.90, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 352 " + @"MH A10\PRIM 727.55\PIN 717.37\POUT 717.17".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296732.07, 1280043.30, 0.0),
Contents = @"MH A9\PRIM 726.97\PIN 714.42\POUT 714.22",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296714.07, 1280025.30, 0.0));
ld.AppendVertex(new Point3d(2296732.07, 1280043.30, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 344 " + @"MH A9\PRIM 726.97\PIN 714.42\POUT 714.22".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296845.25, 1280113.99, 0.0),
Contents = @"MH A6\PRIM 724.78\PIN 712.49\POUT 712.49",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296827.25, 1280095.99, 0.0));
ld.AppendVertex(new Point3d(2296845.25, 1280113.99, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 378 " + @"MH A6\PRIM 724.78\PIN 712.49\POUT 712.49".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296896.69, 1280052.22, 0.0),
Contents = @"MH A5\PRIM 721.41\PIN 699.94\POUT 699.56",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296878.69, 1280034.22, 0.0));
ld.AppendVertex(new Point3d(2296896.69, 1280052.22, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 379 " + @"MH A5\PRIM 721.41\PIN 699.94\POUT 699.56".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2296998.45, 1279930.31, 0.0),
Contents = @"MH A4\PRIM 691.53\PIN 679.57\POUT 677.97",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2296980.45, 1279912.31, 0.0));
ld.AppendVertex(new Point3d(2296998.45, 1279930.31, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 380 " + @"MH A4\PRIM 691.53\PIN 679.57\POUT 677.97".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2297267.93, 1279693.24, 0.0),
Contents = @"MH A3\PRIM 682.94\PIN 673.80\POUT 673.72",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2297249.93, 1279675.24, 0.0));
ld.AppendVertex(new Point3d(2297267.93, 1279693.24, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 381 " + @"MH A3\PRIM 682.94\PIN 673.80\POUT 673.72".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2297287.03, 1279615.72, 0.0),
Contents = @"MH A2\PRIM 688.33\PIN 673.34\POUT 673.34",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2297269.03, 1279597.72, 0.0));
ld.AppendVertex(new Point3d(2297287.03, 1279615.72, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 382 " + @"MH A2\PRIM 688.33\PIN 673.34\POUT 673.34".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2297440.96, 1279636.78, 0.0),
Contents = @"MH A1\PRIM 687.05\PIN 672.41\POUT 672.31",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2297422.96, 1279618.78, 0.0));
ld.AppendVertex(new Point3d(2297440.96, 1279636.78, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 383 " + @"MH A1\PRIM 687.05\PIN 672.41\POUT 672.31".Replace(@"\P", " / "));
}
{
var mt = new MText {
Location = new Point3d(2297442.71, 1279617.32, 0.0),
Contents = @"MH 384\PRIM 686.70\PIN 671.84\POUT N/A",
TextHeight = H,
Attachment = AttachmentPoint.BottomLeft,
};
mt.Layer = LAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);
var ld = new Leader();
ld.AppendVertex(new Point3d(2297424.71, 1279599.32, 0.0));
ld.AppendVertex(new Point3d(2297442.71, 1279617.32, 0.0));
ld.HasArrowHead = true;
ld.Layer = LAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);
Log(" pt 384 " + @"MH 384\PRIM 686.70\PIN 671.84\POUT N/A".Replace(@"\P", " / "));
}
int n = 0;
foreach (ObjectId id in ms) {
var e = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if (e != null && e.Layer == LAYER && e is MText) n++;
}
Log("SEWER_LINE_TEXT now holds " + n + " note(s) (verified)");
Result
Log
pt 473 MH A16 / RIM 751.17 / IN N/A / OUT N/A pt 424 MH A14 / RIM 734.14 / IN 722.02 / OUT 721.82 pt 377 MH A12 / RIM 727.40 / IN N/A / OUT N/A pt 358 TEST MH / RIM 727.72 / IN N/A / OUT N/A pt 353 TEST MH / RIM 727.68 / IN 718.33 / OUT 718.13 pt 352 MH A10 / RIM 727.55 / IN 717.37 / OUT 717.17 pt 344 MH A9 / RIM 726.97 / IN 714.42 / OUT 714.22 pt 378 MH A6 / RIM 724.78 / IN 712.49 / OUT 712.49 pt 379 MH A5 / RIM 721.41 / IN 699.94 / OUT 699.56 pt 380 MH A4 / RIM 691.53 / IN 679.57 / OUT 677.97 pt 381 MH A3 / RIM 682.94 / IN 673.80 / OUT 673.72 pt 382 MH A2 / RIM 688.33 / IN 673.34 / OUT 673.34 pt 383 MH A1 / RIM 687.05 / IN 672.41 / OUT 672.31 pt 384 MH 384 / RIM 686.70 / IN 671.84 / OUT N/A SEWER_LINE_TEXT now holds 14 note(s) (verified)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.