← Inbox

C3D-0467 · Inspect SS_BLOCK_22X17.dwg contents (read-only) done

List source layouts and block defs to find the real title-block name in SS_BLOCK_22X17.dwg.

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

C# payload


string path=@"C:\Users\sanja\OneDrive\_SurveyDisco\SS_BLOCK_22X17.dwg";
using(var src=new Database(false,true)){
    src.ReadDwgFile(path,System.IO.FileShare.Read,true,null);
    using(var stx=src.TransactionManager.StartTransaction()){
        Log("=== SOURCE LAYOUTS ===");
        var lm=(DBDictionary)stx.GetObject(src.LayoutDictionaryId,OpenMode.ForRead);
        foreach(System.Collections.DictionaryEntry de in lm){ var lay=(Layout)stx.GetObject((ObjectId)de.Value,OpenMode.ForRead); Log("  "+de.Key); }
        Log("=== SOURCE BLOCK DEFS (non-anon, with attdefs or SS/TB/BLOCK) ===");
        var bt=(BlockTable)stx.GetObject(src.BlockTableId,OpenMode.ForRead);
        foreach(ObjectId bid in bt){ var b=(BlockTableRecord)stx.GetObject(bid,OpenMode.ForRead); var n=b.Name;
          if(b.IsLayout) continue;
          if(b.HasAttributeDefinitions || n.ToUpper().Contains("SS")||n.ToUpper().Contains("TB")||n.ToUpper().Contains("BLOCK")||n.ToUpper().Contains("22"))
            Log("  DEF: "+n+" attdef="+b.HasAttributeDefinitions); }
        stx.Commit();
    }
}

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

Log

=== SOURCE LAYOUTS ===
  11X17
  13709-779
  22X17
  Model
=== SOURCE BLOCK DEFS (non-anon, with attdefs or SS/TB/BLOCK) ===
  DEF: PRESSUREPARTERRORBLOCK attdef=False
  DEF: 145624724635_Symbols CAD Block_Wheel chair symbol attdef=False
  DEF: _TagCircle attdef=True
  DEF: A$C422bf1cf attdef=False
  DEF: SS_BLOCK_11X17 attdef=True
  DEF: SS_LEGEND attdef=False
  DEF: 11x17 COVER SHEET SS attdef=True
  DEF: SS_BLOCK_11X17 (1) attdef=True
  DEF: SS_BLOCK_11X17 (2) attdef=True
  DEF: SS_BLOCK_11X17 (3) attdef=True

Notes

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

No notes yet.