Exportar entity handle, block name y layout name

Translated by moderator. Original post below the line.


I have a block in the layout (for the sheets) and I need to extract from all the layouts (without selecting them) the entity handle of the block, the name of the block and the name of the layout where it is drawn. I have the following error in the code: AttributeError: ‘document’ objectc has no attribute ‘Document’, line 7.

I don’t know what’s wrong with me. Civil Use 3D 2023
Export_data_Layout.dyn (5.9 KB)
DYNAMO.dwg (1.0 MB)


Original post below


Tengo un bloque en los layout (para los planos) y requiero extraer de todos lo layout (sin seleccionarlos) el entity handle del bloque, el nombre del bloque y el nombre del layout donde está dibujado. Tengo el siguiente error en el código : AttributeError: ‘document’ objetc has no attribute ‘Document’, line 7.

No sé que tengo mal. Uso Civil 3D 2023
Export_data_Layout.dyn (5.9 KB)
DYNAMO.dwg (1.0 MB)

Hi.
The forum language is english to make it possible to help and search.
Please use a translator application or write in english

It is already translated. Thanks

Hola amigo @alejandro.hernandez3 buenas. here’s how to do the query you need, it’s simple just pay attention to levels.


Can I use your file for another post? I need to ask a question very related to this topic!!

Thanks for your help. Sure! you can use this post!