Skip to main content
Solved

Convert AutoCAD text to SHP attribut

  • October 10, 2017
  • 4 replies
  • 230 views

Hello,

I have a DWG file with two layers. In the first one I have lines representing a nework of pipes. In the second one I have autoCAD text describing the pipes diameters. I would like to create a shape file representing the pipes with their diameter as an attribute.

I linked a DWG reader containing the first layer to a SHP writer to create the shape file representing the network of pipe. How can I extract the text (diameter information) from the second layer of my DWG file and how can I link the diameter to the right pipe in the SHP file ?

Thank you for your help,

Best answer by erik_jan

The text value will be in the format attribute fme_text_string (you might have to expose that).

You can rename that on the text objects to Diameter by using an AttributeManager transformer.

The NeighborFinder transformer allows you to find the closest text for each pipe and will add the attribute Diameter to the pipe objects.

Finally you need to add it manually to the output definition for the Shape (or set that to Automatic, but that can add too much).

View original
Did this help you find an answer to your question?

4 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • Best Answer
  • October 10, 2017

The text value will be in the format attribute fme_text_string (you might have to expose that).

You can rename that on the text objects to Diameter by using an AttributeManager transformer.

The NeighborFinder transformer allows you to find the closest text for each pipe and will add the attribute Diameter to the pipe objects.

Finally you need to add it manually to the output definition for the Shape (or set that to Automatic, but that can add too much).


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • October 10, 2017

You can find a good example of this in the installed FME Templates:


Thanks for helping a beginner, it is working fine


  • June 12, 2018
I have a similar need. Does your DWG file yield text points with a valid coordinate system? The solution from @erik_jan seems to suggest that it does, but in my case the DWG file does not, coordinate system "unknown." Any suggestions? Thx in adv.

 


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