← Inbox

C3DO-0730 · 261101 IPS points: pin symbol, no code label done

The four new IPS points (520-523) were plotting as point#/elevation/code (520 1015.44 IPS) - redline item 3 again. Added IPS to the PLAT MONUMENTS group query (pin symbol, no label) and placed a plain IPS callout at each on C-ANNO.

Script file
C3DO-0730.cs
Target
261101 - 5491 Roswell Rd NE.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var civ=CivilDoc;
foreach(ObjectId id in civ.PointGroups){ var g=(Autodesk.Civil.DatabaseServices.PointGroup)Tx.GetObject(id,OpenMode.ForRead); if(g.Name!="PLAT MONUMENTS") continue;
 g.UpgradeOpen(); var q=new Autodesk.Civil.DatabaseServices.StandardPointGroupQuery(); q.IncludeRawDescriptions="IPF*,I IN CRT*,IPS"; g.SetQuery(q); g.Update();
 Log("PLAT MONUMENTS now: "+string.Join(",",g.GetPointNumbers())+" (pin symbol, no code label)"); }
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForWrite);
var tst=(TextStyleTable)Tx.GetObject(Db.TextStyleTableId,OpenMode.ForRead); var sty=tst.Has("Standard")?tst["Standard"]:Db.Textstyle;
var have=new System.Collections.Generic.HashSet<string>(); foreach(ObjectId id in ms){ var m=Tx.GetObject(id,OpenMode.ForRead) as MText; if(m!=null&&m.Layer=="C-ANNO"&&m.Contents=="IPS") have.Add(m.Location.X.ToString("F1")+","+m.Location.Y.ToString("F1")); }
var spots=new System.Collections.Generic.Dictionary<uint,double[]>{{522,new double[]{4,-6}},{521,new double[]{4,4}},{523,new double[]{4,-6}},{520,new double[]{4,4}}};
foreach(ObjectId id in civ.CogoPoints){ var p=(Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id,OpenMode.ForRead); if(!spots.ContainsKey(p.PointNumber)) continue;
 var at=new Point3d(p.Easting+spots[p.PointNumber][0],p.Northing+spots[p.PointNumber][1],0); string k=at.X.ToString("F1")+","+at.Y.ToString("F1"); if(have.Contains(k)) continue;
 var m=new MText(); m.SetDatabaseDefaults(); m.Layer="C-ANNO"; m.TextStyleId=sty; m.TextHeight=3.0; m.Contents="IPS"; m.Attachment=AttachmentPoint.MiddleLeft; m.Location=at;
 ms.AppendEntity(m); Tx.AddNewlyCreatedDBObject(m,true); Log("IPS callout at point "+p.PointNumber+" ["+m.Handle+"]"); }
Ed.Regen();

Result

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

Log

PLAT MONUMENTS now: 334,522,330,520,328,523,243,521 (pin symbol, no code label)
IPS callout at point 520 [214AE]
IPS callout at point 521 [214AF]
IPS callout at point 522 [214B0]
IPS callout at point 523 [214B1]

Notes

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

No notes yet.