← Inbox

C3D-0024 · Read sewer easement + line geometry [EASE-CHK] done

Read-only: every entity on SEWER_EASEMENT, SEWER_LINE and SEWER_LINE_EXISTING with full vertex coordinates, to identify the main run versus the test-MH connector branches.

Script file
C3D-0024.cs
Target
260612 · model space
Author
claude
Approved
yes · reviewer
Timeout
180s

C# payload

// READ-ONLY: the sewer easement + sewer line geometry, so the 30ft easement (15ft each side)
// can be offset from the MAIN RUN only - the test-MH connector branches are excluded.
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);

foreach (var lay in new string[] { "SEWER_EASEMENT", "SEWER_LINE", "SEWER_LINE_EXISTING" })
{
    Log("=== " + lay);
    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 != lay) continue;
        n++;
        var pl = e as Polyline;
        if (pl != null) {
            Log("  PLINE h=" + e.Handle + " verts=" + pl.NumberOfVertices + " len=" + pl.Length.ToString("F2") +
                " closed=" + pl.Closed);
            for (int i = 0; i < pl.NumberOfVertices; i++) {
                var p = pl.GetPoint2dAt(i);
                Log("     v" + i + " (" + p.X.ToString("F2") + "," + p.Y.ToString("F2") + ")");
            }
            continue;
        }
        var ln = e as Line;
        if (ln != null) {
            Log("  LINE  h=" + e.Handle + " (" + ln.StartPoint.X.ToString("F2") + "," + ln.StartPoint.Y.ToString("F2") +
                ") -> (" + ln.EndPoint.X.ToString("F2") + "," + ln.EndPoint.Y.ToString("F2") + ")  len=" + ln.Length.ToString("F2"));
            continue;
        }
        Log("  " + e.GetType().Name + " h=" + e.Handle);
    }
    if (n == 0) Log("  (empty)");
}

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260613 - 5030 E Lake Pkwy, Stockbridge, GA 30281, USA\260612 - CSTORE WATER ABS 30.dwg
Message
Executed C3D-0024 (0 entities touched).
Entities
Duration
380 ms
Civil 3D
25.0.0.0

Log

=== SEWER_EASEMENT
  Site h=23922
  ParcelSegment h=23924
=== SEWER_LINE
  LINE  h=2E95F (2296651.99,1280058.10) -> (2296651.97,1280046.04)  len=12.07
  LINE  h=2EC86 (2296379.85,1279953.52) -> (2296511.25,1279951.45)  len=132.52
  LINE  h=2EC87 (2296511.25,1279951.45) -> (2296604.65,1280046.20)  len=133.21
  LINE  h=2EC88 (2296549.94,1280052.78) -> (2296604.65,1280046.20)  len=55.14
  LINE  h=2EC89 (2296604.65,1280046.20) -> (2296690.96,1280045.90)  len=86.31
  LINE  h=2EC8A (2296690.96,1280045.90) -> (2296714.07,1280025.30)  len=30.97
  LINE  h=2EC8B (2296714.07,1280025.30) -> (2296827.25,1280095.99)  len=133.46
  LINE  h=2EC8C (2296827.25,1280095.99) -> (2296878.69,1280034.22)  len=80.46
  LINE  h=2EC8D (2296878.69,1280034.22) -> (2296980.45,1279912.31)  len=161.58
  LINE  h=2EC8E (2296980.45,1279912.31) -> (2297249.93,1279675.24)  len=359.02
  LINE  h=2EC8F (2297249.93,1279675.24) -> (2297269.03,1279597.72)  len=80.02
  LINE  h=2EC90 (2297269.03,1279597.72) -> (2297422.96,1279618.78)  len=155.37
  LINE  h=2EC91 (2297422.96,1279618.78) -> (2297424.71,1279599.32)  len=19.54
  LINE  h=2EC92 (2296685.19,1280052.35) -> (2296690.96,1280045.90)  len=8.66
=== SEWER_LINE_EXISTING
  (empty)

Notes

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

No notes yet.