← Inbox

C3DO-0788 · 261101 ALTA redline: curb/drive linework west of the W line (read-only) [C3D-ALTAREAD3] error

Read-only: every visible curve 1.5-45 ft outside the Roswell Rd line, as station/offset samples, to locate the two curb cuts.

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

C# payload

string F(double v)=>v.ToString("0.#");
var a=new Point2d(2232335.826,1420451.371); var b=new Point2d(2232331.615,1420625.39); var t=(b-a)/(b-a).Length;
var bt=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead);
var ms=(BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace],OpenMode.ForRead);
foreach(ObjectId id in ms){ var en=Tx.GetObject(id,OpenMode.ForRead) as Curve; if(en==null) continue; var lr=(LayerTableRecord)Tx.GetObject(en.LayerId,OpenMode.ForRead); if(lr.IsFrozen||lr.IsOff) continue;
 double L; try{ L=en.GetDistanceAtParameter(en.EndParam);}catch{continue;} int n=Math.Max(2,(int)(L/2)); var s=new List<string>(); bool hit=false;
 for(int i=0;i<=n;i++){ var p=en.GetPointAtDist(L*i/n); var v=new Vector2d(p.X-a.X,p.Y-a.Y); double st=v.DotProduct(t); double d=-(t.X*v.Y-t.Y*v.X); if(st>-30&&st<210&&d<-1.5&&d>-45) hit=true; if(i%Math.Max(1,n/12)==0||i==n) s.Add(F(st)+"/"+F(d)); }
 if(hit) Log(en.GetType().Name+" "+en.Handle+" L="+en.Layer+" len "+F(L)+" | "+string.Join(" ",s)); }

Result

Status
error
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261101 - Project\261101 - 5491 Roswell Rd NE R2.dwg
Message
eInvalidInput
Entities
—
Duration
469 ms
Civil 3D
25.0.0.0

Notes

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

No notes yet.