C3D-260619-THAW · Undo BLOCK_TB2 freeze - title block vanished rejected
Thaws BLOCK_TB2 in every viewport on 22X17 C. The notch ticket froze that layer to hide the border lines, but it also carries the title block itself so the whole block disappeared. Redrawn border left in place.
C# payload
// UNDO the BLOCK_TB2 viewport freeze from C3D-260619-NOTCH - it hid the title block itself,
// not just the border lines. Thaws BLOCK_TB2 in every viewport on 22X17 C and reports what is
// still frozen per viewport.
// The redrawn notched border on C-ANNO-FRAME is LEFT IN PLACE for now.
// Host owns Tx; host regens after commit.
const string LAYOUT = "22X17 C", TBLAYER = "BLOCK_TB2";
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);
var lt = (LayerTable)Tx.GetObject(Db.LayerTableId, OpenMode.ForRead);
if (!lt.Has(TBLAYER)) { Log("'" + TBLAYER + "' not found"); return; }
int thawed = 0;
foreach (ObjectId id in ps)
{
var vp0 = Tx.GetObject(id, OpenMode.ForRead) as Viewport;
if (vp0 == null) continue;
var vp = (Viewport)Tx.GetObject(id, OpenMode.ForWrite);
vp.ThawLayersInViewport(new ObjectId[] { lt[TBLAYER] }.GetEnumerator());
thawed++;
var frozen = vp.GetFrozenLayers();
var names = new List<string>();
if (frozen != null)
foreach (ObjectId f in frozen)
{
var ltr = Tx.GetObject(f, OpenMode.ForRead) as LayerTableRecord;
if (ltr != null) names.Add(ltr.Name);
}
Log(" vp h=" + vp.Handle + " num=" + vp.Number + " frozen now: " +
(names.Count == 0 ? "(none)" : string.Join(", ", names)));
}
Log("Thawed '" + TBLAYER + "' in " + thawed + " viewport(s) - the title block should be back.");
var ltr2 = (LayerTableRecord)Tx.GetObject(lt[TBLAYER], OpenMode.ForRead);
Log("layer '" + TBLAYER + "' global state: off=" + ltr2.IsOff + " frozen=" + ltr2.IsFrozen);
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.