← Inbox

C3D-0245 · 260714 Huckaby: what in SS_BLOCK_17X11 is still above y=11 done

READ-ONLY diagnostic on the new landscape block.

Script file
C3D-0245.cs
Target
260714 - 285 Huckaby Rd.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

// READ-ONLY: what in SS_BLOCK_17X11 is still above y=11?
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
var btr = (BlockTableRecord)Tx.GetObject(bt["SS_BLOCK_17X11"], OpenMode.ForRead);
foreach (ObjectId id in btr) {
    var ent = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
    if (ent == null) continue;
    double x0,y0,x1,y1;
    var ad = ent as AttributeDefinition;
    if (ad != null) { x0=x1=ad.Position.X; y0=y1=ad.Position.Y; }
    else { try { var e=ent.GeometricExtents; x0=e.MinPoint.X;y0=e.MinPoint.Y;x1=e.MaxPoint.X;y1=e.MaxPoint.Y; } catch { continue; } }
    if (y1 <= 11.001) continue;
    string extra = "";
    var ln = ent as Line;
    if (ln != null) extra = string.Format(" ({0:F3},{1:F3})->({2:F3},{3:F3})", ln.StartPoint.X, ln.StartPoint.Y, ln.EndPoint.X, ln.EndPoint.Y);
    Log(string.Format("ABOVE11 [{0}] {1,-18} ext=({2:F3},{3:F3})-({4:F3},{5:F3}){6}",
        ent.Handle, ent.GetType().Name, x0,y0,x1,y1, extra));
}
Log("--- panel-classified entities that span wide ---");
foreach (ObjectId id in btr) {
    var ent = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
    var ln = ent as Line;
    if (ln == null) continue;
    double w = Math.Abs(ln.EndPoint.X - ln.StartPoint.X);
    if (w > 12.0) Log(string.Format("WIDE [{0}] ({1:F3},{2:F3})->({3:F3},{4:F3}) w={5:F3}",
        ent.Handle, ln.StartPoint.X, ln.StartPoint.Y, ln.EndPoint.X, ln.EndPoint.Y, w));
}

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260714 - 285 Huckaby Rd, Brooks, GA 30205, USA\260714 - 285 Huckaby Rd.dwg
Message
Executed C3D-0245 (0 entities touched).
Entities
Duration
807 ms
Civil 3D
25.0.0.0

Log

ABOVE11 [20E4A] Line               ext=(-0.000,13.765)-(0.000,16.477) (-0.000,13.765)->(0.000,16.477)
--- panel-classified entities that span wide ---
WIDE [20DEE] (-16.957,10.957)->(-0.043,10.957) w=16.914
WIDE [20DEF] (-17.000,11.000)->(0.000,11.000) w=17.000
WIDE [20E42] (-17.000,0.000)->(0.000,0.000) w=17.000

Notes

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

No notes yet.