← Inbox

C3DO-260628 · Add IPS points to the POB group on 261103 done

Adds IPS to the POB point group query so points 527-531 display with the Northing and Easting label, keeping the rest of the query. Nothing else changes.

Script file
C3DO-260628.cs
Target
261103 · model space
Author
claude
Approved
yes · auto-auth
Timeout
120s

C# payload

// Adds the IPS points to the POB point group (Northing and Easting label) by adding IPS to its raw-description query.
// Keeps everything else in the query. Idempotent. Aborts if the query is not a standard query.
var civ = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
ObjectId gid = ObjectId.Null;
foreach (ObjectId id in civ.PointGroups) { var g = (Autodesk.Civil.DatabaseServices.PointGroup)Tx.GetObject(id, OpenMode.ForRead); if (g.Name == "POB") gid = id; }
if (gid.IsNull) throw new System.Exception("POB group not found");
var pg = (Autodesk.Civil.DatabaseServices.PointGroup)Tx.GetObject(gid, OpenMode.ForWrite);
var q = pg.GetQuery() as Autodesk.Civil.DatabaseServices.StandardPointGroupQuery;
if (q == null) throw new System.Exception("POB group query is not a standard query - nothing changed");
string before = q.IncludeRawDescriptions ?? "";
Log("POB query before: rawDesc=\"" + before + "\" numbers=\"" + q.IncludeNumbers + "\" members=" + string.Join(",", pg.GetPointNumbers()));
var parts = new List<string>();
foreach (var s in before.Split(',')) if (s.Trim().Length > 0) parts.Add(s.Trim());
if (parts.Exists(s => s.Equals("IPS", StringComparison.OrdinalIgnoreCase) || s.Equals("IPS*", StringComparison.OrdinalIgnoreCase))) { Log("IPS already in the query - nothing changed"); return; }
parts.Add("IPS");
q.IncludeRawDescriptions = string.Join(",", parts);
pg.SetQuery(q);
pg.Update();
var after = pg.GetPointNumbers();
Log("POB query after: rawDesc=\"" + q.IncludeRawDescriptions + "\" members=" + string.Join(",", after));
foreach (uint n in new uint[] { 527, 528, 529, 530, 531, 532 }) if (Array.IndexOf(after, n) < 0) throw new System.Exception("point " + n + " not in POB group after update");
Log("verified: 527-531 and 532 are in POB");
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261103 - Ahmed J Ahmed Real Estate Company LLC\261103 - 0 WALT STEPHENS RD.dwg
Message
Executed C3DO-260628 (0 entities touched).
Entities
—
Duration
2163 ms
Civil 3D
26.0.0.0

Log

POB query before: rawDesc="POB" numbers="" members=532
POB query after: rawDesc="POB,IPS" members=527,528,529,530,531,532,533
verified: 527-531 and 532 are in POB

Notes

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

No notes yet.