← Inbox

C3D-0650 · 260714: size/orient the new buffer + setback labels [C3D-FIX714] done

Set the 4 new stream buffer/setback labels (245EA-245ED) to the B/L label height, along the line chord, staggered clear of the flood labels; nudge CONTIGUOUS AREA 4.83 AC 45 ft east off the new setback line.

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

C# payload

double h=0; var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
foreach(ObjectId id in ms){ var m=Tx.GetObject(id,OpenMode.ForRead) as MText; if(m!=null&&m.Layer=="C-ANNO"&&m.Text.Contains("B/L")){ h=m.TextHeight; Log("B/L label h="+m.Handle+" '"+m.Text+"' height="+h.ToString("F2")); break; } }
if(h<=0){ Log("STOP - no B/L label to take the height from"); return; }
Action<string,double,double,double,double,double> fix=(hs,x,y,a,nx,ny)=>{ ObjectId id; Db.TryGetObjectId(new Handle(Convert.ToInt64(hs,16)),out id); var m=(MText)Tx.GetObject(id,OpenMode.ForWrite); double oh=m.TextHeight; m.TextHeight=h; m.Rotation=a; m.Location=new Point3d(x+nx*h*1.1,y+ny*h*1.1,0); var ex=m.GeometricExtents; Log("  "+hs+" '"+m.Text+"' height "+oh.ToString("F2")+" -> "+h.ToString("F2")+", rot "+(a*180/Math.PI).ToString("F1")+", extents "+(ex.MaxPoint.X-ex.MinPoint.X).ToString("F0")+" x "+(ex.MaxPoint.Y-ex.MinPoint.Y).ToString("F0")+" ft"); };
fix("245EA",2204300.292,1206950.000,-1.28977714,0.960773,0.277335);
fix("245EB",2204571.462,1207130.000,1.51524765,-0.998458,0.055520);
fix("245EC",2204207.485,1207150.000,1.53640918,-0.999409,0.034380);
fix("245ED",2204667.105,1206950.000,-1.35914687,0.977686,0.210073);
{ ObjectId id; Db.TryGetObjectId(new Handle(Convert.ToInt64("242A2",16)),out id); var m=(MText)Tx.GetObject(id,OpenMode.ForWrite); var o=m.Location; m.Location=new Point3d(o.X+45,o.Y,o.Z); Log("  242A2 '"+m.Text+"' moved 45 ft east off the new setback line"); }
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260714 - 285 Huckaby Rd, Brooks, GA 30205, USA\260714 - 285 Huckaby Rd 22x17.dwg
Message
Executed C3D-0650 (0 entities touched).
Entities
—
Duration
661 ms
Civil 3D
25.0.0.0

Log

B/L label h=242A6 '75' FRONT B/L' height=9.90
  245EA '100' WATERSHED PROTECTION BUFFER' height 9.40 -> 9.90, rot -73.9, extents 96 x 297 ft
  245EB '100' WATERSHED PROTECTION BUFFER' height 9.40 -> 9.90, rot 86.8, extents 29 x 306 ft
  245EC '50' SETBACK' height 9.40 -> 9.90, rot 88.0, extents 15 x 100 ft
  245ED '50' SETBACK' height 9.40 -> 9.90, rot -77.9, extents 33 x 100 ft
  242A2 'CONTIGUOUS AREA 4.83 AC' moved 45 ft east off the new setback line

Notes

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

No notes yet.