Export Attributes

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
gfunvake
Newbie Member
Posts: 4
Joined: Wed Apr 22, 2020 9:40 pm

Export Attributes

Post by gfunvake » Tue Jun 23, 2020 11:23 am

I work on a 64bit Windows 10 Computer, Have QCAD 3.24.3.0 (3.24.3).
I regularly receive data in DWG format that contains custom attributes. I want to create a csv file that contains:
  • A specific custom attribute
  • The X coordinate and
  • The Y coordinate.
Any help will be appreciated.

Gabriel

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Export Attributes

Post by andrew » Wed Jun 24, 2020 9:58 am

You'd have to write a script that does that.

Here are some starting points:

Displaying all block attributes in the command line history of QCAD:
https://github.com/qcad/qcad/blob/maste ... ributes.js

Exporting the block list as CSV file:
https://github.com/qcad/qcad/blob/maste ... tExport.js

gfunvake
Newbie Member
Posts: 4
Joined: Wed Apr 22, 2020 9:40 pm

Re: Export Attributes

Post by gfunvake » Wed Jun 24, 2020 1:35 pm

Thanks - I'll give it a shot.

gfunvake
Newbie Member
Posts: 4
Joined: Wed Apr 22, 2020 9:40 pm

Re: Export Attributes

Post by gfunvake » Thu Jun 25, 2020 11:10 pm

Hi Andrew
I am struggling with this, mostly because I am not really a programmer.
Does QCAD have a LIST command similar to AutoCAD?

CVH
Premier Member
Posts: 3417
Joined: Wed Sep 27, 2017 4:17 pm

Re: Export Attributes

Post by CVH » Fri Jun 26, 2020 6:18 am

Hi,
I was interested in the topic so I stayed lurking. :roll:
I have ('had') a add-on in the pipeline to document drawing entities.
That might just be your LIST command, although I have no AC experience.
It's like Andrew would state it: 'highly experimental'.
And far from finished, still I use it frequently to give me numbers and values without the typing over ...

Starting with scripting in Qcad can have a steep learning curve.
JavaScript or C++ too. e_geek

The two scripts Andrew refers too are actually implemented in Qcad under menu 'Misc' ... 'Block'.
You can try them out but they won't give you all the info you asked for. :(
Including X/Y would not be that hard.
On the command line or to a CSV neither.
I can't say that of Blocks and Attributes.
I did not consider them yet being non-basic drawing entities. :|
And at some points I really don't understand their special techniques fully. :oops:
On top, my recent encounters with them are only on their buggy nature. (see posts)

Could you provide an example file with a multitude of what you want to document?
And how to format it to CSV?
A full blown example drawing will only troubles and confuse me.
Lets start simple, moderate.
I'll give it a try, it would serve my documenting skills anyway ... :wink:

Regards,
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”