← Inbox

C3D-7000PTS · Dump 7000s points (read-only) done

Every CogoPoint numbered 7000-7999 with coords + description.

Script file
C3D-7000PTS.cs
Target
active document · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

// READ-ONLY: dump every CogoPoint numbered 7000-7999 with coords + description.
using System;
using System.Linq;
using System.Collections.Generic;
using Autodesk.Civil.ApplicationServices;
using Autodesk.Civil.DatabaseServices;
using Autodesk.AutoCAD.DatabaseServices;

var db = Db;
var cdoc = CivilDocument.GetCivilDocument(db);
using (var tr = db.TransactionManager.StartTransaction())
{
    var rows = new List<(int n,double e,double no,double z,string d)>();
    foreach (ObjectId id in cdoc.CogoPoints)
    {
        var cp = tr.GetObject(id, OpenMode.ForRead) as CogoPoint;
        if (cp == null) continue;
        int n = (int)cp.PointNumber;
        if (n < 7000 || n > 7999) continue;
        rows.Add((n, cp.Easting, cp.Northing, cp.Elevation, cp.RawDescription ?? ""));
    }
    Log($"7000s POINT COUNT: {rows.Count}");
    foreach (var r in rows.OrderBy(x=>x.n))
        Log($"{r.n},{r.e:0.0000},{r.no:0.0000},{r.z:0.0000},{r.d}");
    tr.Commit();
}

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260613 - 5030 E Lake Pkwy, Stockbridge, GA 30281, USA\SS_Outfall_260612_SHEET.dwg
Message
Executed C3D-7000PTS (0 entities touched).
Entities
Duration
350 ms
Civil 3D
25.0.0.0

Log

7000s POINT COUNT: 14
7000,2296379.9155,1279953.4931,751.3052,SSMH
7001,2296511.2990,1279951.4396,734.3105,SSMH
7002,2296604.8091,1280046.2393,727.3577,SSMH
7003,2296550.0185,1280052.1931,731.4691,SSMH TOP STUB
7004,2296652.0905,1280058.0883,727.7526,SSMH
7005,2296685.3185,1280052.2091,727.7290,SSMH
7006,2296713.9066,1280025.1247,726.9841,SSMH
7007,2296827.2974,1280096.1071,724.7354,SSMH A6
7008,2296878.6992,1280034.2288,721.4724,SSMH A5
7009,2296980.3753,1279912.0813,691.2536,SSMH A4
7010,2297249.9378,1279675.2908,682.8422,SSMH A3
7011,2297269.0965,1279597.6123,688.3299,SSMH A2
7012,2297423.0090,1279618.6604,687.2727,SSMH A1
7013,2297424.7637,1279599.2288,686.9654,SSMH MAIN LINE

Notes

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

No notes yet.