Skip to main content
Question

Write all text from DWG into JSON or XML


Hi,

I am currently trying to archive information out of old DWG files in my company. But so far I am still rather uncertain with how I open the DWG files in FME in a way, that I can access the labels within the DWG file and write them into another file format.

I found a lot of tutorials with how to write into DWG, but nothing much the other way around.

Can someone help or point me in the right direction?

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

You can set up a DWG reader and have it group by Geometry Type (via the parameters), then you can simply only select the texts.

 

Then adding a JSON or XML writer should, in principle, do the trick.


  • Author
  • June 29, 2023
redgeographics wrote:

You can set up a DWG reader and have it group by Geometry Type (via the parameters), then you can simply only select the texts.

 

Then adding a JSON or XML writer should, in principle, do the trick.

Thank you for your answer.

 

Okay, I did that and I have the texts now, but when I write it, I get all the meta information in the XML, but not the actual content of the text.

 

This is what the text layer looks like in inspection.

what_it_looks_like 

But this is the write output.

what_it_writesAnd what I want is the actual text. So like the MB07+MB09 and so on.


redgeographics
Celebrity
Forum|alt.badge.img+49
alex_rump wrote:

Thank you for your answer.

 

Okay, I did that and I have the texts now, but when I write it, I get all the meta information in the XML, but not the actual content of the text.

 

This is what the text layer looks like in inspection.

what_it_looks_like 

But this is the write output.

what_it_writesAnd what I want is the actual text. So like the MB07+MB09 and so on.

The text string is stored in an attribute called fme_text_string, which is hidden by default, you can use an AttributeExposer to make it visible (also make sure to add it to the output feature type)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings