← Inbox

C3D-0018 · Tie line 378 to HC07-06 [TIE-378-675] done

Draws the control tie from point 378 (SSMH A6) to point 675 (HC07-06): stubbed 120ft leader with arrowhead at the control end, labelled along the line with the computed bearing and the TRUE 9725.42ft distance.

Script file
C3D-0018.cs
Target
260612 · model space
Author
claude
Approved
yes · reviewer
Timeout
180s

C# payload

// Control tie line: point 378 (SSMH A6) -> point 675 (HC07-06, a 2007 control point).
//
// Per the control-tie-lines recipe:
//   * bearing and distance COMPUTED from the two surveyed coordinates, never typed
//   * read in the direction of travel FROM the origin TO the control
//   * the tie is STUBBED (120ft) - the true tie is 9725ft and would run far off the sheet -
//     but the label carries the REAL computed distance
//   * arrowhead at the CONTROL end
//   * label sits ALONG the line, rotated to it, flipped if it would read upside-down
//   * wording "TO CC <id>"
//
//     S43d 30' 29"E 9725.42 TO CC HC07-06
//
// Leader on V-CTRL-LINE-SHOT, label on V-CTRL-TEXT. Host owns Tx; host regens after commit.
const string LLAYER = "V-CTRL-LINE-SHOT", TLAYER = "V-CTRL-TEXT";
const double H = 4.0;

var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForWrite);
EnsureLayer(LLAYER, 45);
EnsureLayer(TLAYER, 7);

var ld = new Leader();
ld.AppendVertex(new Point3d(2296827.248, 1280095.994, 0.0));
ld.AppendVertex(new Point3d(2296909.863, 1280008.961, 0.0));
ld.HasArrowHead = true;
ld.Layer = LLAYER;
ms.AppendEntity(ld);
Tx.AddNewlyCreatedDBObject(ld, true);

var mt = new MText {
    Location   = new Point3d(2296868.555, 1280052.477, 0.0),
    Contents   = @"S43\U+00B0 30' 29""E 9725.42 TO CC HC07-06",
    TextHeight = H,
    Rotation   = -0.811437,
    Attachment = AttachmentPoint.BottomCenter,
};
mt.Layer = TLAYER;
ms.AppendEntity(mt);
Tx.AddNewlyCreatedDBObject(mt, true);

Log("tie 378 -> 675 (HC07-06): 120.0 ft stub drawn, true distance 9725.42 ft");
Log("  label: " + mt.Contents);

Result

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

Log

tie 378 -> 675 (HC07-06): 120.0 ft stub drawn, true distance 9725.42 ft
  label: S43\U+00B0 30' 29"E 9725.42 TO CC HC07-06

Notes

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

No notes yet.