← Inbox

C3D-TBC613 · Connect TBC curb points (260613) done

DRAFT. Run A 1049-1076 (breaks at TBC END), Run B 1080-1089 (after GUTTER END TBC), plus 4 isolated ~3ft couplets as separate segments (1008/09, 1020/21, 1032/33, 1042/43) - a single chain would cut across the 35-71ft gaps. Layer SS-V-ROAD-CURB.

Script file
C3D-TBC613.cs
Target
C:\Users\sanja\OneDrive\_SurveyDisco\260613 - 5030 E Lake Pkwy, Stockbridge, GA 30281, USA\CSTORE WATER ABS-260612_SHEET.dwg · model space
Author
claude
Approved
yes · reviewer
Timeout
60s

C# payload

// DRAFT: connect TBC (top back of curb) points into linework on 260613.
// Runs derived from point-number order + break codes (TBC END / GUTTER END TBC) and gap analysis:
//   Run A 1049-1076 (ends at 'TBC END'), Run B 1080-1089 (after 'GUTTER END TBC').
//   1008/1009, 1020/1021, 1032/1033, 1042/1043 are ~3' couplets separated by 35-71' gaps —
//   drawn as separate short segments, NOT chained (a single chain would cut across the gaps).
var cd = CivilDoc; var cps = cd.CogoPoints;
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
var ms = (BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);

var P = new Dictionary<uint, Point2d>();
foreach (ObjectId id in cps) {
    var cp = (Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id, OpenMode.ForRead);
    P[cp.PointNumber] = new Point2d(cp.Easting, cp.Northing);
}

const string LAYER = "SS-V-ROAD-CURB";
EnsureLayer(LAYER, 2);

void Run(uint[] nums, string label) {
    var v = new List<Point2d>();
    foreach (var n in nums) if (P.ContainsKey(n)) v.Add(P[n]);
    if (v.Count < 2) { Log($"{label}: <2 pts, skip"); return; }
    var pl = new Polyline();
    for (int i = 0; i < v.Count; i++) pl.AddVertexAt(i, v[i], 0, 0, 0);
    pl.Layer = LAYER;
    ms.AppendEntity(pl); Tx.AddNewlyCreatedDBObject(pl, true);
    double len = 0; for (int i = 1; i < v.Count; i++) len += v[i-1].GetDistanceTo(v[i]);
    Log($"{label}: {v.Count} pts, {len:F1}' (verified)");
}

// main continuous curb, broken at the END codes
Run(new uint[]{1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,
               1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076}, "Run A 1049-1076");
Run(new uint[]{1080,1081,1083,1084,1086,1087,1088,1089}, "Run B 1080-1089");

// isolated curb couplets (~3' apart, big gaps between) — separate segments
Run(new uint[]{1008,1009}, "Pair 1008-1009");
Run(new uint[]{1020,1021}, "Pair 1020-1021");
Run(new uint[]{1032,1033}, "Pair 1032-1033");
Run(new uint[]{1042,1043}, "Pair 1042-1043");

Log("TBC linework drafted on SS-V-ROAD-CURB.");

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260613 - 5030 E Lake Pkwy, Stockbridge, GA 30281, USA\CSTORE WATER ABS-260612_SHEET.dwg
Message
Executed C3D-TBC613 (0 entities touched).
Entities
Duration
326 ms
Civil 3D
25.0.0.0

Log

Run A 1049-1076: 28 pts, 285.8' (verified)
Run B 1080-1089: 8 pts, 109.3' (verified)
Pair 1008-1009: 2 pts, 3.0' (verified)
Pair 1020-1021: 2 pts, 3.1' (verified)
Pair 1032-1033: 2 pts, 3.1' (verified)
Pair 1042-1043: 2 pts, 2.9' (verified)
TBC linework drafted on SS-V-ROAD-CURB.

Notes

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

No notes yet.