79331738

Date: 2025-01-05 23:33:48
Score: 0.5
Natty:
Report link

console = "" def COUT(CoutString): global console console = console + f"{CoutString}\n"

with adoc.LockDocument(): with adoc.Database as db:

    with db.TransactionManager.StartTransaction() as tr:
        bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead)
        btr = tr.GetObject(db.CurrentSpaceId, OpenMode.ForRead)
        
        for entity_id in btr:
            entity_def = tr.GetObject(entity_id, OpenMode.ForRead)
            a = entity_def.ExtensionDictionary
            b = tr.GetObject(a, OpenMode.ForRead)
            for i in b:
                COUT(tr.GetObject(i.Value, OpenMode.ForRead).Note)

Surely this will help somebody now... FYI I found this using reflection commands such as MyEntity.GetType().GetProperties()

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: James F