← Inbox

C3DO-0801 · 261101 ALTA 7/7: layout fixes from the check plot [C3D-A7FIX] done

From the PDF check of 11X17: shorten the title-block note (it overprinted the TAX PARCEL row); move the new left notes clear of the legend's SBUC line (x 3.70, w 3.30, h 0.055); sheet number h 0.09; drop the 'NOT HELD' ties 5.5 ft so they stop masking the IPF labels; move the (R) south call, FMLS steps label, curb label, south island label, SBUC label and N wall label off the text they overprinted; seg 57.50 label to the east side; remove my COMMON LINE note that sat on the A/C pads.

Script file
C3DO-0801.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 SW=new Point2d(2232335.826,1420451.371); var NW=new Point2d(2232331.615,1420625.39); var NE=new Point2d(2232597.423,1420644.363); var SE=new Point2d(2232597.585,1420479.555);
var A=new Dictionary<string,Point2d>{{"W",SW},{"N",NW},{"E",NE},{"S",SE}}; var B=new Dictionary<string,Point2d>{{"W",NW},{"N",NE},{"E",SE},{"S",SW}};
Vector2d T(string k){ var v=B[k]-A[k]; return v/v.Length; }
Vector2d Nn(string k){ var t=T(k); return new Vector2d(t.Y,-t.X); }
Point3d P(string k,double s,double o){ var p=A[k]+T(k)*s+Nn(k)*o; return new Point3d(p.X,p.Y,0); }
// a. title-block note (block def) shorter so it stays in its cell
var tm=(MText)Tx.GetObject(H("20EC2"),OpenMode.ForWrite); string om=tm.Contents;
tm.Contents="TITLE MATTERS PER COMMITMENT NO. __________ ARE SHOWN OR NOTED HEREON. REVISED 11/19/26 TO ALTA/NSPS PER REDLINE OF 11/18/26."; tm.TextHeight=0.08;
Log("title-block note -> \""+tm.Contents+"\" height "+F(tm.ActualHeight)+" (verified)");
var tbr=(BlockReference)Tx.GetObject(H("20355"),OpenMode.ForWrite); tbr.RecordGraphicsModified(true);
// b, c paper space
foreach(var lay in new[]{"11X17","11X17 SHEET 2"}){ var ps=PS(lay);
  foreach(ObjectId id in ps){ if(!(Tx.GetObject(id,OpenMode.ForRead) is MText m)) continue;
    if(m.Contents.StartsWith("BOUNDARY RESOLUTION:")){ m.UpgradeOpen(); m.Location=new Point3d(3.70,14.70,0); m.Width=3.30; m.TextHeight=0.055; Log(lay+" left notes -> x 3.70 w 3.30 h 0.055 ; bottom y "+F(14.70-m.ActualHeight)+" (verified)"); }
    if(m.Contents.StartsWith(@"SHEET\P")){ m.UpgradeOpen(); m.TextHeight=0.09; Log(lay+" sheet number h 0.09"); } } }
// d-l model labels
var ids=new List<ObjectId>(); foreach(ObjectId id in MS) ids.Add(id);
foreach(var id in ids){ if(!(Tx.GetObject(id,OpenMode.ForRead) is MText m)) continue; string c=m.Contents; Point3d o=m.Location; bool hit=true; m.UpgradeOpen();
  if(c.StartsWith("NOT HELD - ")) m.Location=new Point3d(o.X,o.Y-5.5,0);
  else if(c.StartsWith("(R) S83")) m.Location=P("S",190,-14);
  else if(c.StartsWith("CONC. STEPS & WALK")) m.Location=P("S",150,-11);
  else if(c.StartsWith("CURB 2.1' E")) m.Location=P("W",128,-5);
  else if(c.StartsWith("CURB ISLAND (R/W)\\P")) m.Location=P("W",14,-20);
  else if(c.StartsWith("SBUC ")) m.Location=new Point3d(o.X,o.Y-4.0,0);
  else if(c=="WALL 9.6' S OF LINE") m.Location=P("N",42,4);
  else if(c.StartsWith(@"COMMON LINE\PNOT MONUMENTED")){ m.Erase(); Log("erased my label from C3DO-0796 (sat on the A/C pads): "+c.Replace("\\P"," ")); continue; }
  else if(c.StartsWith("(R) S04") && c.Contains("57.50")){ var up=new Vector3d(-Math.Sin(m.Rotation),Math.Cos(m.Rotation),0); m.Attachment=AttachmentPoint.TopCenter; m.Location=o-up*2.0; }
  else { hit=false; m.DowngradeOpen(); }
  if(hit) Log("moved \""+c.Replace("\\P"," / ")+"\" "+F(o.X)+","+F(o.Y)+" -> "+F(m.Location.X)+","+F(m.Location.Y)); }
Ed.Regen();

Result

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

Log

title-block note -> "TITLE MATTERS PER COMMITMENT NO. __________ ARE SHOWN OR NOTED HEREON. REVISED 11/19/26 TO ALTA/NSPS PER REDLINE OF 11/18/26." height 0.404 (verified)
11X17 sheet number h 0.09
11X17 left notes -> x 3.70 w 3.30 h 0.055 ; bottom y 12.382 (verified)
11X17 SHEET 2 sheet number h 0.09
moved "(R) S83\U+00B022'17"W 263.28'" 2232468.401,1420450.056 -> 2232410.176,1420445.295
moved "NOT HELD - 103.76' FROM SE CORNER / (102.24' S, 17.71' E)" 2232619.297,1420372.817 -> 2232619.297,1420367.317
moved "NOT HELD - 16.09' FROM SE CORNER / (16.08' S, 0.56' W)" 2232601.025,1420458.971 -> 2232601.025,1420453.471
moved "CONC. STEPS & WALK (FMLS) / 0.2' N TO 16.3' S OF LINE" 2232466.55,1420444.828 -> 2232449.625,1420452.56
moved "SBUC 4.4' W OF LINE / (IN R/W)" 2232328.399,1420447.177 -> 2232328.399,1420443.177
moved "CURB 2.1' E TO 1.8' W OF LINE" 2232326.441,1420591.185 -> 2232327.731,1420579.213
moved "CURB ISLAND (R/W) / 14.2' W OF LINE, NOSE AT LINE" 2232315.711,1420455.886 -> 2232315.493,1420464.883
moved "WALL 9.6' S OF LINE" 2232359.829,1420623.394 -> 2232373.793,1420624.39
moved "(R) S04\U+00B035'35"E 57.50'" 2232432.246,1420603.581 -> 2232434.241,1420603.725
erased my label from C3DO-0796 (sat on the A/C pads): COMMON LINE NOT MONUMENTED, PLOTTED FROM RECORD CALLS

Notes

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

No notes yet.