C3D-0235 · 260612 Springdale: re-read SS_BLOCK_11X17 after the move done
READ-ONLY. Current state of the block definition, to locate the title-block cluster and the boundary line that was moved with it.
C# payload
// READ-ONLY: everything inside the SS_BLOCK_11X17 definition, with each entity's extents,
// so the title-block cluster can be identified by position before anything is moved.
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
if (!bt.Has("SS_BLOCK_11X17")) { Log("SS_BLOCK_11X17 not found"); return; }
var btr = (BlockTableRecord)Tx.GetObject(bt["SS_BLOCK_11X17"], OpenMode.ForRead);
Log("=== SS_BLOCK_11X17 contents ===");
Log("origin/base point: " + btr.Origin.ToString());
double gxmin=1e30, gymin=1e30, gxmax=-1e30, gymax=-1e30;
int n = 0;
foreach (ObjectId id in btr) {
Autodesk.AutoCAD.DatabaseServices.DBObject o;
try { o = Tx.GetObject(id, OpenMode.ForRead); } catch { continue; }
var ent = o as Autodesk.AutoCAD.DatabaseServices.Entity;
if (ent == null) continue;
n++;
double xmin=0, ymin=0, xmax=0, ymax=0;
bool haveExt = false;
try {
var e = ent.GeometricExtents;
xmin=e.MinPoint.X; ymin=e.MinPoint.Y; xmax=e.MaxPoint.X; ymax=e.MaxPoint.Y;
haveExt = true;
if (xmin<gxmin) gxmin=xmin; if (ymin<gymin) gymin=ymin;
if (xmax>gxmax) gxmax=xmax; if (ymax>gymax) gymax=ymax;
} catch { }
string extra = "";
var ad = ent as AttributeDefinition;
if (ad != null) extra = string.Format(" TAG={0} prompt=\"{1}\" default=\"{2}\" pos=({3:F3},{4:F3}) h={5:F3}",
ad.Tag, ad.Prompt, ad.TextString, ad.Position.X, ad.Position.Y, ad.Height);
var mt = ent as MText;
if (mt != null) extra = string.Format(" \"{0}\" at ({1:F3},{2:F3}) h={3:F3}",
mt.Contents.Replace("\n", " ").Substring(0, Math.Min(45, mt.Contents.Length)), mt.Location.X, mt.Location.Y, mt.TextHeight);
var dt = ent as DBText;
if (dt != null) extra = string.Format(" \"{0}\" at ({1:F3},{2:F3}) h={3:F3}",
dt.TextString, dt.Position.X, dt.Position.Y, dt.Height);
var ln = ent as Line;
if (ln != null) extra = string.Format(" ({0:F3},{1:F3})->({2:F3},{3:F3})",
ln.StartPoint.X, ln.StartPoint.Y, ln.EndPoint.X, ln.EndPoint.Y);
Log(string.Format("[{0}] {1,-20} layer={2,-18} ext=({3:F3},{4:F3})-({5:F3},{6:F3}){7}",
ent.Handle, ent.GetType().Name, ent.Layer,
haveExt?xmin:0, haveExt?ymin:0, haveExt?xmax:0, haveExt?ymax:0, extra));
}
Log("");
Log(string.Format("entities={0} BLOCK EXTENTS=({1:F3},{2:F3})-({3:F3},{4:F3}) size {5:F3} x {6:F3}",
n, gxmin, gymin, gxmax, gymax, gxmax-gxmin, gymax-gymin));
Result
Log
=== SS_BLOCK_11X17 contents === origin/base point: (0,0,0) [23391] Viewport layer=BLOCK_TB2 ext=(-21.461,0.043)-(-0.043,16.434) [23394] Line layer=BLOCK_TB2 ext=(-0.043,13.546)-(-0.043,15.324) (-0.043,13.546)->(-0.043,15.324) [23395] Line layer=BLOCK_TB2 ext=(-21.461,16.434)-(-0.043,16.434) (-21.461,16.434)->(-0.043,16.434) [23396] Line layer=BLOCK_TB2 ext=(-21.509,16.477)-(0.000,16.477) (-21.509,16.477)->(0.000,16.477) [23397] MText layer=BLOCK_TB2 ext=(-15.043,15.678)-(-11.460,16.048) "ALL MATTERS OF TITLE ARE EXCEPTED. THIS PLAT " at (-15.043,16.048) h=0.085 [23398] Line layer=BLOCK_TB2 ext=(-15.156,15.554)-(-15.156,16.213) (-15.156,16.213)->(-15.156,15.554) [23399] Line layer=BLOCK_TB2 ext=(-21.458,15.283)-(-13.714,15.284) (-21.458,15.284)->(-13.714,15.283) [2339A] Line layer=BLOCK_TB2 ext=(-21.458,15.013)-(-13.714,15.014) (-21.458,15.014)->(-13.714,15.013) [2339B] Line layer=BLOCK_TB2 ext=(-21.458,14.743)-(-13.714,14.745) (-21.458,14.745)->(-13.714,14.743) [2339C] Line layer=BLOCK_TB2 ext=(-21.458,14.473)-(-13.714,14.475) (-21.458,14.475)->(-13.714,14.473) [2339D] Line layer=BLOCK_TB2 ext=(-21.458,15.554)-(-13.840,15.554) (-21.458,15.554)->(-13.840,15.554) [2339E] DBText layer=BLOCK_TB2 ext=(-16.355,14.811)-(-14.874,14.928) "SCALE: GRAPHIC" at (-16.355,14.811) h=0.117 [2339F] Line layer=BLOCK_TB2 ext=(-18.919,14.474)-(-18.919,15.284) (-18.919,15.284)->(-18.919,14.474) [233A0] Line layer=BLOCK_TB2 ext=(-13.840,15.554)-(-11.301,15.554) (-13.840,15.554)->(-11.301,15.554) [233A1] Line layer=BLOCK_TB2 ext=(-21.458,16.213)-(-11.303,16.213) (-21.458,16.213)->(-11.303,16.213) [233A2] DBText layer=BLOCK_TB2 ext=(-21.417,16.085)-(-20.508,16.162) "PREPARED FOR:" at (-21.417,16.085) h=0.076 [233A3] Line layer=BLOCK_TB2 ext=(-16.809,14.474)-(-16.808,15.284) (-16.808,15.284)->(-16.809,14.474) [233E1] Line layer=BLOCK_TB2 ext=(-15.368,16.401)-(-15.368,16.434) (-15.368,16.434)->(-15.368,16.401) [233E3] Line layer=BLOCK_TB2 ext=(-21.458,13.546)-(-21.458,16.213) (-21.458,16.213)->(-21.458,13.546) [233E4] Line layer=BLOCK_TB2 ext=(-13.714,13.546)-(-13.714,15.554) (-13.714,15.554)->(-13.714,13.546) [233E5] Line layer=BLOCK_TB2 ext=(-21.458,13.546)-(-0.041,13.546) (-21.458,13.546)->(-0.041,13.546) [233E6] Line layer=BLOCK_TB2 ext=(-21.458,16.213)-(-11.303,16.213) (-11.303,16.213)->(-21.458,16.213) [233E7] Line layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,6.883) (0.000,0.000)->(0.000,6.883) [233E8] Line layer=BLOCK_TB2 ext=(-0.043,0.043)-(-0.043,16.434) (-0.043,0.043)->(-0.043,16.434) [233E9] Line layer=BLOCK_TB2 ext=(-21.509,13.503)-(0.000,13.503) (-21.509,13.503)->(0.000,13.503) [233EA] Line layer=BLOCK_TB2 ext=(-21.509,0.000)-(-21.509,16.477) (-21.509,16.477)->(-21.509,0.000) [233EB] DBText layer=BLOCK_TB2 ext=(-19.767,14.101)-(-15.386,14.338) "SAWHNEY & ASSOCIATES" at (-19.801,14.101) h=0.238 [233EC] DBText layer=BLOCK_TB2 ext=(-19.372,13.881)-(-17.778,13.986) "523 HASTINGS WAY" at (-19.372,13.881) h=0.106 [233ED] DBText layer=BLOCK_TB2 ext=(-17.610,13.868)-(-15.781,13.974) "JONESBORO GA 30238" at (-17.610,13.868) h=0.106 [233EE] DBText layer=BLOCK_TB2 ext=(-18.479,13.711)-(-17.132,13.843) "PH.# (678)478-6857" at (-18.486,13.738) h=0.081 [233EF] Line layer=BLOCK_TB2 ext=(-14.365,13.546)-(-14.364,14.474) (-14.364,14.474)->(-14.365,13.546) [233F0] Line layer=BLOCK_TB2 ext=(-0.000,6.883)-(-0.000,13.765) (-0.000,6.883)->(-0.000,13.765) [233F1] Line layer=BLOCK_TB2 ext=(-0.000,13.765)-(0.000,16.477) (-0.000,13.765)->(0.000,16.477) [233F3] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "JOB NO.: 251002" at (-16.357,14.567) h=0.117 [233F4] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "SITE_ADDRESS" at (-21.395,15.373) h=0.117 [233F5] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "REF DB xxx Page xxx" at (-21.392,14.554) h=0.117 [233F6] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "LAND LOT: ###" at (-18.883,15.104) h=0.117 [233F7] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "DISTRICT: #TH" at (-18.880,14.838) h=0.117 [233F8] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "COUNTY: CLAYCO" at (-18.887,14.554) h=0.117 [233F9] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "DATE: 10/16/25" at (-16.333,15.093) h=0.117 [233FA] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "SUBDIVISION_NAME LOT ##" at (-14.136,16.325) h=0.117 [233FB] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "PREP_FOR" at (-21.346,15.740) h=0.150 [233FC] AttributeDefinition layer=BLOCK_TB2 ext=(0.000,0.000)-(0.000,0.000) "BOUNDARY SURVEY" at (-21.444,16.324) h=0.200 [233FD] Line layer=BLOCK_TB2 ext=(-21.461,0.043)-(-21.461,16.434) (-21.461,0.043)->(-21.461,16.434) [2F07C] Line layer=BLOCK_TB2 ext=(-11.301,13.546)-(-11.301,15.554) (-11.301,15.554)->(-11.301,13.546) [2F07D] Line layer=BLOCK_TB2 ext=(-11.301,14.206)-(-11.301,16.213) (-11.301,16.213)->(-11.301,14.206) entities=46 BLOCK EXTENTS=(-21.509,0.000)-(0.000,16.477) size 21.509 x 16.477
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.