← Inbox

C3D-0668 · 261009 sheet fixes 2: trim main viewport bottom to the title band, shorten AE label, MH label off vicinity map [C3D-FIX1009B] done

11X17 + 11X17 DEMO main viewport bottom edge raised from 0.333 to 3.45 in (top unchanged, same scale and model-to-paper mapping) so the clipped GIS data no longer runs through the title band. Zone AE label shortened to ZONE AE LIMIT (BFE 890) and moved clear of the Lot 29 adjoiner text. MH SMJC2100170 label 30 ft east off the vicinity map.

Script file
C3D-0668.cs
Target
261009 - 510 Covington Cove.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

var ld=(DBDictionary)Tx.GetObject(Db.LayoutDictionaryId,OpenMode.ForRead);
foreach(DBDictionaryEntry de in ld){ var lo=(Layout)Tx.GetObject(de.Value,OpenMode.ForRead); if(lo.LayoutName!="11X17"&&lo.LayoutName!="11X17 DEMO") continue;
 var btr=(BlockTableRecord)Tx.GetObject(lo.BlockTableRecordId,OpenMode.ForRead);
 foreach(ObjectId id in btr){ var v=Tx.GetObject(id,OpenMode.ForRead) as Viewport; if(v==null||v.Number==1||Math.Abs(v.ViewCenter.X-2276418.03)>1) continue;
  if(Math.Abs(v.Height-16.373)>0.01){ Log("  "+lo.LayoutName+" vp "+v.Handle+" already trimmed (h="+v.Height.ToString("F3")+")"); continue; }
  v.UpgradeOpen(); bool lk=v.Locked; v.Locked=false; double top=v.CenterPoint.Y+v.Height/2, bot=3.45, s=v.CustomScale;
  var oc=v.CenterPoint; var ovc=v.ViewCenter; double dy=((top+bot)/2-oc.Y);
  v.Height=top-bot; v.CenterPoint=new Point3d(oc.X,(top+bot)/2,0); v.ViewCenter=new Point2d(ovc.X,ovc.Y+dy/s); v.Locked=lk;
  Log("  "+lo.LayoutName+" vp "+v.Handle+": bottom edge "+(oc.Y-16.373/2).ToString("F3")+" -> "+bot+" (top "+top.ToString("F3")+"), view center Y "+ovc.Y.ToString("F2")+" -> "+v.ViewCenter.Y.ToString("F2")+" (same model->paper mapping, 1:"+(1/s).ToString("F0")+")"); } }
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
foreach(ObjectId id in ms){ var t=Tx.GetObject(id,OpenMode.ForRead) as DBText; if(t==null) continue;
 if(t.Layer=="V-FEMA-TEXT"&&t.TextString.StartsWith("ZONE AE LIMIT")&&t.TextString.Contains("13121C0088G")){ t.UpgradeOpen(); string o=t.TextString; t.TextString="ZONE AE LIMIT (BFE 890)"; t.AlignmentPoint=new Point3d(2276520.06,1456129.80,0); t.Rotation=0.04; t.AdjustAlignment(Db); Log("AE label h="+t.Handle+": '"+o+"' -> '"+t.TextString+"' (panel stays in the flood note)"); }
 if(t.Layer=="SS-SEWER LINE"&&t.TextString.StartsWith("MH SMJC2100170")){ t.UpgradeOpen(); var o=t.AlignmentPoint; t.AlignmentPoint=new Point3d(o.X+30,o.Y,0); t.AdjustAlignment(Db); Log("moved MH SMJC2100170 label h="+t.Handle+" 30' east off the vicinity map"); }
}
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261009 - 510 Covington Cove, Byron, GA 31008, USA\261009 - 510 Covington Cove.dwg
Message
Executed C3D-0668 (0 entities touched).
Entities
—
Duration
477 ms
Civil 3D
25.0.0.0

Log

  11X17 vp 1FDA0: bottom edge 0.333 -> 3.45 (top 16.705), view center Y 1456126.76 -> 1456204.70 (same model->paper mapping, 1:50)
  11X17 DEMO vp 21697: bottom edge 0.333 -> 3.45 (top 16.705), view center Y 1456126.76 -> 1456204.70 (same model->paper mapping, 1:50)
moved MH SMJC2100170 label h=21AF4 30' east off the vicinity map
AE label h=21B7B: 'ZONE AE LIMIT (100-YR FLOODPLAIN) BFE 890 FIRM 13121C0088G' -> 'ZONE AE LIMIT (BFE 890)' (panel stays in the flood note)

Notes

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

No notes yet.