← Inbox

C3D-260619-CLERKBOX · Redline 3 - clerk recording box error

Adds the 3in x 3in blank clerk-of-court recording box in the upper-left of 22X17 C per OCGA 15-6-67(c)(1)(B), with the caption placed outside the box so the reserved area stays clear. Layer C-ANNO-CLERK.

Script file
C3D-260619-CLERKBOX.cs
Target
260619 · paper space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

// REDLINE #3 - 3" x 3" clerk of court recording box, upper-left corner.
// O.C.G.A. 15-6-67(c)(1)(B) requires a blank 3x3 inch space in the upper left for the clerk's
// recording information. Sheet is 22x17; title block border runs (0.25,0.26)-(21.75,16.74), so
// the box is inset just inside it. Upper-left of the sheet is empty - the cert stack starts at
// x=11.56 and the scale bar sits at y<1.0.
// Drawn as a closed Polyline + a small caption, on a dedicated layer so it can be toggled.
// Host owns Tx; host regens after commit.
const string LAYOUT = "22X17 C", LAYER = "C-ANNO-CLERK";
const double SIZE = 3.0;
const double X0 = 0.45, Y1 = 16.55;          // inset from the 0.25/16.74 border
double Y0 = Y1 - SIZE, X1 = X0 + SIZE;

var layDict = (DBDictionary)Tx.GetObject(Db.LayoutDictionaryId, OpenMode.ForRead);
var layout  = (Layout)Tx.GetObject(layDict.GetAt(LAYOUT), OpenMode.ForRead);
var ps      = (BlockTableRecord)Tx.GetObject(layout.BlockTableRecordId, OpenMode.ForWrite);
EnsureLayer(LAYER, 7);

// idempotent - bail if a 3x3 box already sits there
foreach (ObjectId id in ps)
{
    var p0 = Tx.GetObject(id, OpenMode.ForRead) as Polyline;
    if (p0 == null || p0.Layer != LAYER) continue;
    Log("clerk box already present (h=" + p0.Handle + ")"); return;
}

var pl = new Polyline();
pl.AddVertexAt(0, new Point2d(X0, Y0), 0, 0, 0);
pl.AddVertexAt(1, new Point2d(X1, Y0), 0, 0, 0);
pl.AddVertexAt(2, new Point2d(X1, Y1), 0, 0, 0);
pl.AddVertexAt(3, new Point2d(X0, Y1), 0, 0, 0);
pl.Closed = true;
pl.Layer = LAYER;
ps.AppendEntity(pl);
Tx.AddNewlyCreatedDBObject(pl, true);

// caption OUTSIDE the box - the 3x3 must stay blank for the clerk
var cap = new MText {
    Location   = new Point3d(X0, Y0 - 0.06, 0.0),
    Contents   = "3\" x 3\" RESERVED FOR CLERK OF SUPERIOR COURT\PRECORDING INFORMATION - O.C.G.A. 15-6-67(c)(1)(B)",
    TextHeight = 0.06,
    Width      = SIZE,
    Attachment = AttachmentPoint.TopLeft,
};
cap.Layer = LAYER;
ps.AppendEntity(cap);
Tx.AddNewlyCreatedDBObject(cap, true);

var e = pl.GeometricExtents;
Log("clerk box " + (e.MaxPoint.X-e.MinPoint.X).ToString("F2") + " x " + (e.MaxPoint.Y-e.MinPoint.Y).ToString("F2") +
    " in at (" + e.MinPoint.X.ToString("F2") + "," + e.MinPoint.Y.ToString("F2") + ")-(" +
    e.MaxPoint.X.ToString("F2") + "," + e.MaxPoint.Y.ToString("F2") + ") on '" + LAYER + "' (verified)");

Result

Status
error
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260619 - 3625 Stonewall Tell Rd, Atlanta, GA 30349, USA\260619 - 3625 Stonewall Tell Rd ROTATE.dwg
Message
Compile error: (39,65): error CS1009: Unrecognized escape sequence
Entities
Duration
29 ms
Civil 3D
25.0.0.0

Notes

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

No notes yet.