← Inbox

C3D-0020 · Tie line arrow size 5.0 [ARROW-SZ] done

Sets Leader.Dimasz = 5.0 on every leader on V-CTRL-LINE-SHOT (the control tie lines). Reads back to confirm.

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

C# payload

// Set the tie-line arrowhead size to 5.0.
// Leader.Dimasz is the arrow size (verified by reflecting AcDbMgd - Leader declares Dimasz,
// Dimscale, Dimgap, Dimtxt etc; there is no "arrow size" under any other name).
// Applies to every Leader on V-CTRL-LINE-SHOT. Reads back to confirm.
// Host owns Tx; host regens after commit.
const string LLAYER = "V-CTRL-LINE-SHOT";
const double ASZ = 5.0;

var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForWrite);

int n = 0;
foreach (ObjectId id in ms)
{
    var ld0 = Tx.GetObject(id, OpenMode.ForRead) as Leader;
    if (ld0 == null || ld0.Layer != LLAYER) continue;
    double before = ld0.Dimasz;
    var w = (Leader)Tx.GetObject(id, OpenMode.ForWrite);
    w.Dimasz = ASZ;
    double now = ((Leader)Tx.GetObject(id, OpenMode.ForRead)).Dimasz;
    Log("  leader h=" + ld0.Handle + "  arrow " + before.ToString("F3") + " -> " + now.ToString("F3") +
        (System.Math.Abs(now - ASZ) < 1e-9 ? "  (verified)" : "  (MISMATCH)"));
    n++;
}
Log("set arrow size " + ASZ.ToString("F1") + " on " + n + " leader(s) on '" + LLAYER + "'");

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-0020 (0 entities touched).
Entities
Duration
333 ms
Civil 3D
25.0.0.0

Log

  leader h=2EDFE  arrow 5.000 -> 5.000  (verified)
set arrow size 5.0 on 1 leader(s) on 'V-CTRL-LINE-SHOT'

Notes

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

No notes yet.