← Inbox

C3DO-0798 · 261101 ALTA 6b/7: sheet 2 text up and to 0.08 so the legal clears the title line [C3D-A6FIX] done

The legal description on 11X17 SHEET 2 ran down to y 3.24 and overprinted the ALTA/NSPS title line; move both sheet-2 text columns to top 16.55 and text height 0.08.

Script file
C3DO-0798.cs
Target
261101 - 5491 Roswell Rd NE R2.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

string F(double v)=>v.ToString("0.###");
ObjectId H(string h)=>Db.GetObjectId(false,new Handle(Convert.ToInt64(h,16)),0);
ObjectId Lyr(string name,short c){ var lt=(LayerTable)Tx.GetObject(Db.LayerTableId,OpenMode.ForRead); if(lt.Has(name)) return lt[name]; lt.UpgradeOpen(); var r=new LayerTableRecord{Name=name,Color=Autodesk.AutoCAD.Colors.Color.FromColorIndex(Autodesk.AutoCAD.Colors.ColorMethod.ByAci,c)}; var id=lt.Add(r); Tx.AddNewlyCreatedDBObject(r,true); Log("layer created "+name); return id; }
ObjectId Put(BlockTableRecord btr, Autodesk.AutoCAD.DatabaseServices.Entity e, string layer){ e.SetDatabaseDefaults(Db); e.Layer=layer; var id=btr.AppendEntity(e); Tx.AddNewlyCreatedDBObject(e,true); return id; }
var LM=LayoutManager.Current;
BlockTableRecord PS(string name){ var l=(Layout)Tx.GetObject(LM.GetLayoutId(name),OpenMode.ForRead); return (BlockTableRecord)Tx.GetObject(l.BlockTableRecordId,OpenMode.ForWrite); }
var BT=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead);
var MS=(BlockTableRecord)Tx.GetObject(BT[BlockTableRecord.ModelSpace],OpenMode.ForWrite);
bool HasText(BlockTableRecord btr,string contains){ foreach(ObjectId id in btr){ var o=Tx.GetObject(id,OpenMode.ForRead); if(o is MText m && m.Contents.Contains(contains)) return true; if(o is DBText t && t.TextString.Contains(contains)) return true; } return false; }

var ps=PS("11X17 SHEET 2");
foreach(ObjectId id in ps){ if(Tx.GetObject(id,OpenMode.ForRead) is MText m && (m.Contents.StartsWith(@"{\L LEGAL")||m.Contents.StartsWith(@"{\L PARCEL ONE AND"))){
  m.UpgradeOpen(); double ob=m.Location.Y-m.ActualHeight; m.Location=new Point3d(m.Location.X,16.55,0); m.TextHeight=0.08;
  Log(id.Handle+" top 16.30 -> 16.55, h 0.085 -> 0.08 ; bottom "+F(ob)+" -> "+F(16.55-m.ActualHeight)+" (verified)"); } }
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261101 - Project\261101 - 5491 Roswell Rd NE R2.dwg
Message
Executed C3DO-0798 (0 entities touched).
Entities
—
Duration
404 ms
Civil 3D
25.0.0.0

Log

21FBB top 16.30 -> 16.55, h 0.085 -> 0.08 ; bottom 3.242 -> 4.66 (verified)
21FBC top 16.30 -> 16.55, h 0.085 -> 0.08 ; bottom 11.896 -> 12.805 (verified)

Notes

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

No notes yet.