← Inbox

C3D-ALLDESC · List all point descriptions (read-only) done

Distinct raw descriptions + counts to find the fence code

Script file
C3D-ALLDESC.cs
Target
active document · model space
Author
claude
Approved
yes · claude (read-only inspection)
Timeout
60s

C# payload

// Read-only: list the distinct raw descriptions across ALL cogo points with counts, so we can
// identify the real fence code (Rule 9 — read the points, don't guess the abbreviation).
var cd = CivilDoc; var cps = cd.CogoPoints;
var tally = new Dictionary<string,int>();
foreach (ObjectId id in cps) {
    var cp = (Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id, OpenMode.ForRead);
    var raw = (cp.RawDescription ?? "").Trim();
    tally[raw] = tally.TryGetValue(raw, out var n) ? n+1 : 1;
}
foreach (var kv in tally) Log($"  x{kv.Value,-3} '{kv.Key}'");
Log($"distinct descriptions: {tally.Count}");

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260702 - 358 St Johns Ave SW, Atlanta, GA 30315, USA\260702 - 358 St Johns Ave SW.dwg
Message
Executed C3D-ALLDESC (0 entities touched).
Entities
Duration
279 ms
Civil 3D
25.0.0.0

Log

  x6   'CON COR'
  x2   'STEP'
  x4   'DECK STEP'
  x5   'HC'
  x2   'DECK COR'
  x9   'DYW'
  x2   'DWY SW'
  x4   'DWY'
  x2   'DWY  COR'
  x1   'HC SW'
  x1   'SW AT DECK'
  x1   'HC DWY COR'
  x1   'LP'
  x2   'NG'
  x1   'IPF 1\2 RBF FC FL'
  x3   'CLEAN OUT'
  x2   'AC'
  x1   'FL'
  x1   'POWER METER'
  x1   'HC DECK COR'
  x2   'DWY COR'
  x2   'DWY  EP'
  x5   'CL'
  x5   'EP'
  x2   'PP'
  x1   'CL CL'
  x1   'SSMH'
  x1   'FLAGED FC'
  x1   'IPF SQ ROD'
  x1   'OLD FLAGED FC'
  x1   'WM'
  x1   'G WIRE'
  x1   'FC FL'
  x1   'FF'
distinct descriptions: 34

Notes

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

No notes yet.