← Inbox

C3D-0261 · 260714 Huckaby: switch 17X11 to a full-bleed landscape media done

After clearing the rotation the paper is 17x11 but the printable area is only 16.50x9.50, so the 17x11 border clips. The portrait sheet uses ANSI_full_bleed_B_(11.00x17.00). Lists every full_bleed media and switches to the 17.00x11.00 one, then reports whether the border now fits inside the printable area.

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

C# payload

// Printable area came out 16.50 x 9.50 on a 17 x 11 sheet, so the 17 x 11 border clips.
// The PORTRAIT sheet uses ANSI_full_bleed_B_(11.00_x_17.00_Inches) - zero margins. Find the
// landscape full-bleed equivalent and use it.
LayoutManager.Current.CurrentLayout = "17X11";
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 l0 = (Layout)Tx.GetObject(rec.LayoutId, OpenMode.ForRead);
    if (l0.LayoutName != "17X11") continue;
    var lay = (Layout)Tx.GetObject(rec.LayoutId, OpenMode.ForWrite);
    var psv = PlotSettingsValidator.Current;

    Log("--- every full_bleed media available ---");
    var list = psv.GetCanonicalMediaNameList(lay);
    string target = null;
    foreach (string s in list) {
        if (s.IndexOf("full_bleed", StringComparison.OrdinalIgnoreCase) < 0) continue;
        Log("   " + s);
        if (s.IndexOf("17.00_x_11.00", StringComparison.OrdinalIgnoreCase) >= 0) target = s;
    }

    if (target == null) {
        Log("no landscape full-bleed B found - keeping " + lay.CanonicalMediaName);
    } else {
        psv.SetCanonicalMediaName(lay, target);
        try { psv.SetPlotRotation(lay, PlotRotation.Degrees000); } catch { }
        Log("media -> " + target);
    }

    var back = (Layout)Tx.GetObject(rec.LayoutId, OpenMode.ForRead);
    var m = back.PlotPaperMargins;
    double pw = back.PlotPaperSize.X / 25.4, ph = back.PlotPaperSize.Y / 25.4;
    double aw = pw - (m.MinPoint.X + m.MaxPoint.X) / 25.4;
    double ah = ph - (m.MinPoint.Y + m.MaxPoint.Y) / 25.4;
    Log("media : " + back.CanonicalMediaName + "  rot=" + back.PlotRotation);
    Log(string.Format("paper {0:F2} x {1:F2} in   printable {2:F2} x {3:F2} in   border 17.00 x 11.00 (verified)",
        pw, ph, aw, ah));
    if (aw >= 16.99 && ah >= 10.99) Log("FITS: the full 17x11 border is inside the printable area.");
    else Log(string.Format("STILL CLIPS by {0:F2} wide x {1:F2} tall", 17.0-aw, 11.0-ah));
}
Ed.Regen();

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

Log

--- every full_bleed media available ---
   ANSI_full_bleed_A
   ANSI_full_bleed_B
   ANSI_full_bleed_C
   ANSI_full_bleed_D
   ANSI_full_bleed_E
   ANSI_full_bleed_F
   ARCH_full_bleed_A
   ARCH_full_bleed_B
   ARCH_full_bleed_C
   ARCH_full_bleed_D
   ARCH_full_bleed_E
   ARCH_full_bleed_E1
   ISO_full_bleed_A0
   ISO_full_bleed_A1
   ISO_full_bleed_A2
   ISO_full_bleed_A3
   ISO_full_bleed_A4
   ISO_full_bleed_4A0
   ISO_full_bleed_2A0
   ISO_full_bleed_A5
   ISO_full_bleed_B0
   ISO_full_bleed_B1
   ISO_full_bleed_B2
   ISO_full_bleed_B3
   ISO_full_bleed_B4
   ISO_full_bleed_B5
no landscape full-bleed B found - keeping ANSI_B_(17.00_x_11.00_Inches)
media : ANSI_B_(17.00_x_11.00_Inches)  rot=Degrees000
paper 17.00 x 11.00 in   printable 16.50 x 9.50 in   border 17.00 x 11.00 (verified)
STILL CLIPS by 0.50 wide x 1.50 tall

Notes

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

No notes yet.