Skip to main content
Solved

Reading DWG block attributes, how to access?

  • October 4, 2018
  • 3 replies
  • 74 views

havmoejbv
Contributor
Forum|alt.badge.img+16

I have some DWG files with data drawn as blocks with attributes. When I look at these in Data Inspector, I notice that the block attributes shows up in two ways:

I've read through https://knowledge.safe.com/articles/59335/autocad-dwg-block-attribute-extraction.html and see that while I can access the attribute info from the attribute lists (top marking) it would be a lot easier to just grab the info as shown at the bottom. The problem is I can't find this via e.g. the attribute exposer. Anyone got a good idea?

(Demo DWG attached)

Best answer by itay

Hi @havmoejbv,

I have just used your DWG and managed to successfully write the TEKST attribute value into a CSV.

I used an AttributeExposer and a CSV writer with the TEKST attribute added to it.

Hope this helps,

Itay

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • 1442 replies
  • Best Answer
  • October 4, 2018

Hi @havmoejbv,

I have just used your DWG and managed to successfully write the TEKST attribute value into a CSV.

I used an AttributeExposer and a CSV writer with the TEKST attribute added to it.

Hope this helps,

Itay


havmoejbv
Contributor
Forum|alt.badge.img+16
  • Author
  • Contributor
  • 38 replies
  • October 4, 2018

Hi @havmoejbv,

I have just used your DWG and managed to successfully write the TEKST attribute value into a CSV.

I used an AttributeExposer and a CSV writer with the TEKST attribute added to it.

Hope this helps,

Itay

Oh, that's interresting. Even though the TEKST attribute doesn't show in the list of attributes in AttributeExposer, it can be added, and seems to be working as normal after that. I didn't even think of trying that. Thanks!

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • October 4, 2018

@havmoejbv

the attribute_info{} is a list. (which you can explode or list index etc.)

In the list the object is known as a ..info{}.name and its value as ..info{}.value

The object is a AutoCAD text object, which explains the TEKST being available as an attribute.