← Inbox

C3D-0654 · 260714: size/orient the new buffer + setback labels [C3D-FIX714C] 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; third pass: west labels clear of the stream CL label and 100-yr flood text.

Script file
C3D-0654.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",2204307.895,1206870.000,-1.31203415,0.966707,0.255884);
fix("245EB",2204631.943,1206850.000,-1.15755181,0.915823,0.401583);
fix("245EC",2204223.471,1206975.000,-1.22950865,-0.942324,-0.334701);
fix("245ED",2204641.163,1207250.000,1.36716933,0.979340,-0.202223);

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-0654 (0 entities touched).
Entities
—
Duration
702 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.90 -> 9.90, rot -75.2, extents 90 x 299 ft
  245EB '100' WATERSHED PROTECTION BUFFER' height 9.90 -> 9.90, rot -66.3, extents 134 x 285 ft
  245EC '50' SETBACK' height 9.90 -> 9.90, rot -70.4, extents 45 x 98 ft
  245ED '50' SETBACK' height 9.90 -> 9.90, rot 78.3, extents 32 x 100 ft

Notes

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

No notes yet.