C3D-0652 · 260714: size/orient the new buffer + setback labels [C3D-FIX714B] 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; second pass: move two labels clear of the flood elevation text.
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",2204303.017,1206900.000,-1.32879137,0.970859,0.239650);
fix("245EB",2204631.943,1206850.000,-1.15755181,0.915823,0.401583);
fix("245EC",2204207.485,1207150.000,1.53640918,-0.999409,0.034380);
fix("245ED",2204641.163,1207250.000,1.36716933,0.979340,-0.202223);
Ed.Regen();
Result
Log
B/L label h=242A6 '75' FRONT B/L' height=9.90 245EA '100' WATERSHED PROTECTION BUFFER' height 9.90 -> 9.90, rot -76.1, extents 85 x 300 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 88.0, extents 15 x 100 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.