Export Block Attributes

Something similar as Misc .. Block .. List Block Attribute but then as CSV export.
Instead as text on the Command History.

In reply to this topic request by user ‘Rolinger’.

# UPDATE # 1 issue fixed, downloaded 5 times before the fix.
BlockAttributesExport.js (8.56 KB)
We can define the Block in question by selecting a Block Reference or by highlighting a Block in the Block List.

Note that the order of attribute tags is unsorted.
Edit the script Addon with a text editor and look for the # Issue # marker.
Add a method to sort the array called tags in a user custom order.

Direct installation:
Save open files and close the QCAD application.
Under …/scripts, where the 3 dots represent your QCAD installation path.
Create a sub-folder structure *…\QCAD\scripts\Misc\MiscBlock\BlockAttributesExport*
Copy the attached file over to the BlockAttributesExport sub-folder.
Restart QCAD.

Regards,
CVH

Sorry guys, It seems that there was a wrong resource included.
Still, it was fully functional on my old PC running 3.27.6.0 pro (msi) and 3.31.0.0 trial among other (zip). :unamused:

Detected the culprit on another PC.

This is fixed in the above attachment.

Regards,
CVH

I do NOT know where the error was, but now it works perfectly! :smiley:
Thank you CVH

Hi

I’m running QCAD

Version: 3.32.9.0 (3.32.9)

Build Date: May 6 2026

Revision: 65655b9

Qt Version: 6.11.0

Architecture: x86_64

Compiler: Clang 15.0.0

But this script only produces a file with the number “1” inside…

regards

Jan Magne

Reply by mail because all access to the forum for older or slightly older browsers ceased.

@LanJan

That can’t be true, when creating a new CSV file the first thing that is exported is ‘Block:’ + the name of the selected block.

A block can be selected in two ways:

Or a Block Reference entity is selected when starting the script tool.

Or a Block-definition different from Model-Space is selected in the Block List.

For several exceptions it issues a message or warning on the Command History.

The script was published around QCAD revision 3.31 and has never been tested on the latest version (3.32.9 while a next is pending)

Perhaps you could attach the drawing file where the export is limited to ‘1’.

Regards,

CVH