← Inbox

C3D-0463 · List layouts + 22x17 block defs 260904 (read-only) done

List existing layouts and any 22x17 / title-block definitions to build the exemption plat layout.

Script file
C3D-0463.cs
Target
260904 - 920 W Sandtown Rd SW.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var lm=(DBDictionary)Tx.GetObject(Db.LayoutDictionaryId,OpenMode.ForRead);
Log("=== LAYOUTS ===");
foreach(System.Collections.DictionaryEntry de in lm){ var lay=(Layout)Tx.GetObject((ObjectId)de.Value,OpenMode.ForRead); Log("  "+de.Key+"  tab#"+lay.TabOrder); }
var bt=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead);
Log("=== 22X17 / TITLE BLOCK DEFS ===");
foreach(ObjectId bid in bt){ var b=(BlockTableRecord)Tx.GetObject(bid,OpenMode.ForRead); var n=b.Name.ToUpper(); if(n.Contains("22X17")||n.Contains("BLOCK")||n.Contains("TB")||n.Contains("SS_")) Log("  DEF: "+b.Name+" hasAttDef="+b.HasAttributeDefinitions+" isLayout="+b.IsLayout); }

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260711 - 281 Maranatha Trail, Lawrenceville, GA 30045, USA\260711 - 281 Maranatha Trail R2.dwg
Message
Executed C3D-0463 (0 entities touched).
Entities
Duration
1459 ms
Civil 3D
25.0.0.0

Log

=== LAYOUTS ===
  09  tab#2
  11X17  tab#1
  Model  tab#0
  R4  tab#3
=== 22X17 / TITLE BLOCK DEFS ===
  DEF: PRESSUREPARTERRORBLOCK hasAttDef=False isLayout=False
  DEF: SS_BLOCK_11X17 hasAttDef=True isLayout=False

Notes

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

No notes yet.