← Inbox

C3D-0255 · 260714 Huckaby: which 11X17 entities fall off a 17x11 sheet at +6.5 shift done

READ-ONLY diagnostic. Lists the entities rejected by the furniture copy so the shift can be corrected.

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

C# payload

// What on 11X17 would land off-sheet after a +6.5 X shift onto a 17x11 sheet?
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
foreach (ObjectId btrId in bt) {
    var rec = (BlockTableRecord)Tx.GetObject(btrId, OpenMode.ForRead);
    if (!rec.IsLayout) continue;
    var lay = (Layout)Tx.GetObject(rec.LayoutId, OpenMode.ForRead);
    if (lay.LayoutName != "11X17") continue;
    int ok = 0, bad = 0, noext = 0;
    foreach (ObjectId id in rec) {
        var o = Tx.GetObject(id, OpenMode.ForRead);
        if (o is Viewport) continue;
        var ent = o as Autodesk.AutoCAD.DatabaseServices.Entity;
        if (ent == null) continue;
        double x0,y0,x1,y1;
        try { var e = ent.GeometricExtents; x0=e.MinPoint.X;y0=e.MinPoint.Y;x1=e.MaxPoint.X;y1=e.MaxPoint.Y; }
        catch { noext++; Log(string.Format("NO-EXTENTS {0} layer={1}", ent.GetType().Name, ent.Layer)); continue; }
        double sx0=x0+6.5, sx1=x1+6.5;
        bool fits = sx0>=0.1 && sx1<=17.4 && y0>=0.1 && y1<=11.4;
        if (fits) ok++;
        else {
            bad++;
            if (bad <= 25) Log(string.Format("OFF {0,-14} ({1:F2},{2:F2})-({3:F2},{4:F2}) -> x {5:F2}..{6:F2} y {7:F2}..{8:F2}",
                ent.GetType().Name, x0,y0,x1,y1, sx0,sx1,y0,y1));
        }
    }
    Log(string.Format("would fit: {0}   off-sheet: {1}   no-extents: {2}", ok, bad, noext));
}

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-0255 (0 entities touched).
Entities
Duration
330 ms
Civil 3D
25.0.0.0

Log

OFF Line           (10.42,15.89)-(10.42,16.52) -> x 16.92..16.92 y 15.89..16.52
OFF Line           (10.37,15.88)-(10.42,16.52) -> x 16.87..16.92 y 15.88..16.52
OFF Line           (10.42,15.89)-(10.42,16.49) -> x 16.92..16.92 y 15.89..16.49
OFF Line           (10.42,15.89)-(10.42,16.41) -> x 16.92..16.92 y 15.89..16.41
OFF Line           (10.41,15.89)-(10.41,16.33) -> x 16.91..16.91 y 15.89..16.33
OFF Polyline2d     (10.29,14.38)-(10.56,15.08) -> x 16.79..17.06 y 14.38..15.08
OFF DBText         (10.49,13.46)-(10.57,14.11) -> x 16.99..17.07 y 13.46..14.11
OFF Line           (10.42,13.50)-(10.42,14.14) -> x 16.92..16.92 y 13.50..14.14
OFF Arc            (10.36,13.50)-(10.42,13.55) -> x 16.86..16.92 y 13.50..13.55
OFF Line           (10.36,13.55)-(10.42,14.14) -> x 16.86..16.92 y 13.55..14.14
OFF Line           (10.41,13.54)-(10.41,14.01) -> x 16.91..16.91 y 13.54..14.01
OFF Line           (10.42,13.53)-(10.42,14.06) -> x 16.92..16.92 y 13.53..14.06
OFF Line           (10.42,13.52)-(10.42,14.12) -> x 16.92..16.92 y 13.52..14.12
OFF Line           (10.39,13.55)-(10.39,13.85) -> x 16.89..16.89 y 13.55..13.85
OFF Line           (10.38,13.55)-(10.38,13.80) -> x 16.88..16.88 y 13.55..13.80
OFF Line           (10.38,13.55)-(10.38,13.75) -> x 16.88..16.88 y 13.55..13.75
OFF Line           (10.37,13.55)-(10.37,13.70) -> x 16.87..16.87 y 13.55..13.70
OFF Line           (10.37,13.55)-(10.37,13.65) -> x 16.87..16.87 y 13.55..13.65
OFF Line           (10.36,13.55)-(10.36,13.59) -> x 16.86..16.86 y 13.55..13.59
OFF Line           (10.40,13.55)-(10.40,13.91) -> x 16.90..16.90 y 13.55..13.91
OFF Line           (10.40,13.54)-(10.40,13.96) -> x 16.90..16.90 y 13.54..13.96
OFF Line           (10.42,14.14)-(10.42,14.39) -> x 16.92..16.92 y 14.14..14.39
OFF Line           (10.42,15.17)-(10.42,15.76) -> x 16.92..16.92 y 15.17..15.76
OFF Line           (10.32,15.16)-(10.34,15.40) -> x 16.82..16.84 y 15.16..15.40
OFF Polyline2d     (10.35,15.26)-(10.47,15.76) -> x 16.85..16.97 y 15.26..15.76
would fit: 34   off-sheet: 105   no-extents: 0

Notes

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

No notes yet.