← Inbox

C3DO-260627 · Read: IPS/POB points and point group display done

Read-only: point group draw order and styles, IPS and POB points, point label style names. Changes nothing.

Script file
C3DO-260627.cs
Target
261103 · model space
Author
claude
Approved
yes · read-only
Timeout
120s

C# payload

// Read-only: point groups (display chain), IPS and POB points, label style names.
var civ = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
Log("drawing: " + Db.Filename);
string LName(ObjectId id) { if (id.IsNull) return "<none>"; try { return ((Autodesk.Civil.DatabaseServices.Styles.LabelStyle)Tx.GetObject(id, OpenMode.ForRead)).Name; } catch { return "?"; } }
string PName(ObjectId id) { if (id.IsNull) return "<none>"; try { return ((Autodesk.Civil.DatabaseServices.Styles.PointStyle)Tx.GetObject(id, OpenMode.ForRead)).Name; } catch { return "?"; } }
var watch = new HashSet<uint> { 527, 528, 529, 530, 531, 532 };
Log("=== DRAW ORDER (index 0 wins) ===");
int i = 0;
foreach (ObjectId gid in civ.PointGroups.DrawOrder) {
    var pg = (Autodesk.Civil.DatabaseServices.PointGroup)Tx.GetObject(gid, OpenMode.ForRead);
    var nums = pg.GetPointNumbers();
    var hit = new List<string>(); foreach (var n in nums) if (watch.Contains(n)) hit.Add(n.ToString());
    Log("  " + i++ + " \"" + pg.Name + "\" n=" + nums.Length + " styleOvr=" + pg.IsPointStyleOverridden + " style=" + PName(pg.PointStyleId) + " labelOvr=" + pg.IsPointLabelStyleOverridden + " label=" + LName(pg.PointLabelStyleId) + (hit.Count > 0 ? "  has: " + string.Join(",", hit) : ""));
}
Log("=== POINTS ===");
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
foreach (ObjectId id in ms) {
    var cp = Tx.GetObject(id, OpenMode.ForRead) as CogoPoint;
    if (cp == null || !watch.Contains(cp.PointNumber)) continue;
    Log("  " + cp.PointNumber + " \"" + cp.RawDescription + "\" full=\"" + cp.FullDescription + "\" N=" + cp.Northing.ToString("F3") + " E=" + cp.Easting.ToString("F3") + " style=" + PName(cp.StyleId) + " label=" + LName(cp.LabelStyleId) + " layer=" + cp.Layer);
}
Log("=== POINT LABEL STYLES ===");
foreach (ObjectId sid in civ.Styles.LabelStyles.PointLabelStyles.LabelStyles) Log("  " + LName(sid));

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-260627 (0 entities touched).
Entities
—
Duration
4442 ms
Civil 3D
26.0.0.0

Log

drawing: C:\Users\sanja\OneDrive\_SurveyDisco\261103 - Ahmed J Ahmed Real Estate Company LLC\261103 - 0 WALT STEPHENS RD.dwg
=== DRAW ORDER (index 0 wins) ===
  0 "WM" n=3 styleOvr=False style=Water Valve labelOvr=False label=<none>
  1 "FH" n=0 styleOvr=False style=Hydrant (existing) labelOvr=False label=<none>
  2 "GAS" n=0 styleOvr=False style=Gas METER labelOvr=False label=<none>
  3 "FF" n=0 styleOvr=False style=Basic labelOvr=False label=Elevation and Description
  4 "POB" n=1 styleOvr=False style=Drill Hole labelOvr=False label=Northing and Easting  has: 532
  5 "MH" n=2 styleOvr=False style=Storm Sewer Manhole labelOvr=False label=<none>
  6 "Copy of PP" n=0 styleOvr=False style=Catch Basin labelOvr=False label=<none>
  7 "IPF NS" n=9 styleOvr=False style=Iron Pin labelOvr=False label=Description Only [IPF]  has: 529,527,528,530,531
  8 "PP" n=0 styleOvr=False style=Utility Pole labelOvr=False label=<none>
  9 "UTIL" n=11 styleOvr=False style=Test Pit labelOvr=False label=Description Only
  10 "_All Points" n=98 styleOvr=False style=Basic labelOvr=False label=Point#-Elevation-Description  has: 527,528,529,530,531,532
  11 "No Display" n=97 styleOvr=False style=<none> labelOvr=False label=<none>  has: 527,528,529,530,531,532
  12 "Copy of TBC" n=0 styleOvr=False style=Test Pit labelOvr=False label=Description Only
  13 "BUILDING" n=4 styleOvr=False style=Basic labelOvr=False label=Description Only
  14 "NORTHING_EASTING" n=0 styleOvr=False style=Iron Pin [LARGE] labelOvr=False label=Northing and Easting
  15 "Display [SPECIFIC]" n=12 styleOvr=False style=Basic labelOvr=False label=Description Only
  16 "TOPO" n=96 styleOvr=False style=Basic labelOvr=False label=Point#-Elevation-Description  has: 527,528,529,530,531
  17 "WALL ELEV" n=7 styleOvr=False style=Sign (single pole) labelOvr=False label=Elevation and Description  has: 532
  18 "TREES" n=0 styleOvr=False style=Tree labelOvr=False label=Description Only
  19 "TBC" n=38 styleOvr=False style=Test Pit labelOvr=False label=<none>
  20 "FENCE" n=7 styleOvr=False style=Basic labelOvr=False label=Point#-Elevation-Description
=== POINTS ===
  527 "IPS" full="IPS" N=1283486.106 E=2271786.086 style=<none> label=<none> layer=0
  528 "IPS" full="IPS" N=1283485.438 E=2271685.498 style=<none> label=<none> layer=0
  529 "IPS" full="IPS" N=1283487.296 E=2271631.130 style=<none> label=<none> layer=0
  530 "IPS" full="IPS" N=1283507.680 E=2271624.286 style=<none> label=<none> layer=SS-0-FRAME
  531 "IPS" full="IPS" N=1283449.829 E=2271504.548 style=<none> label=<none> layer=0
  532 "POB" full="POB" N=1283568.779 E=2271911.271 style=<none> label=<none> layer=0
=== POINT LABEL STYLES ===
  Description Only [IPF]
  Elevation Only
  Point#-Elevation-Description [HANDICAP]
  Elevation and Description
  Northing and Easting
  Point Number Only
  Point# and Description
  Point#-Elevation-Description
  Description Only

Notes

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

No notes yet.