← Inbox

C3D-0706 · 261101 title block: FIRM date fits beside the zone [C3D-TB261101B] done

Squeezes the FIRM_DATE attribute (EFFECTIVE SEPTEMBER 18, 2013,) so it no longer runs into FLOOD_ZONE on the same line.

Script file
C3D-0706.cs
Target
261101 - Project.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var ld=(DBDictionary)Tx.GetObject(Db.LayoutDictionaryId,OpenMode.ForRead);
var lo=(Layout)Tx.GetObject(ld.GetAt("11X17"),OpenMode.ForRead);
var ps=(BlockTableRecord)Tx.GetObject(lo.BlockTableRecordId,OpenMode.ForRead);
foreach(ObjectId id in ps){ var br=Tx.GetObject(id,OpenMode.ForRead) as BlockReference; if(br==null||br.Name!="SS_BLOCK_11X17") continue;
 double zoneX=0; foreach(ObjectId aid in br.AttributeCollection){ var a=(AttributeReference)Tx.GetObject(aid,OpenMode.ForRead); if(a.Tag=="FLOOD_ZONE") zoneX=a.GeometricExtents.MinPoint.X; }
 foreach(ObjectId aid in br.AttributeCollection){ var a=(AttributeReference)Tx.GetObject(aid,OpenMode.ForRead); if(a.Tag!="FIRM_DATE") continue;
  var ex=a.GeometricExtents; double lim=zoneX-0.06;
  if(ex.MaxPoint.X>lim){ a.UpgradeOpen(); double f=(lim-ex.MinPoint.X)/(ex.MaxPoint.X-ex.MinPoint.X); a.WidthFactor*=f; a.AdjustAlignment(Db); }
  var e2=a.GeometricExtents; Log("FIRM_DATE x "+e2.MinPoint.X.ToString("F2")+"-"+e2.MaxPoint.X.ToString("F2")+", FLOOD_ZONE starts "+zoneX.ToString("F2")+", width factor "+a.WidthFactor.ToString("F3")+" (verified)"); } }
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261101 - Project\261101 - Project.dwg
Message
Executed C3D-0706 (0 entities touched).
Entities
—
Duration
657 ms
Civil 3D
25.0.0.0

Log

FIRM_DATE x 8.33-9.62, FLOOD_ZONE starts 9.68, width factor 0.939 (verified)

Notes

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

No notes yet.