Solved

Manipulate "Text Location" orientation

  • 6 August 2019
  • 6 replies
  • 34 views

Badge +12

I am trying to adjust the text orientation by changing the fme_rotation attribute in the TextAdder transformer. However, the text orientation attributes does not take the changes. Do you know how I can access or somehow manipulate the values in the red box from the image below?

 

In this example i have change the rotation to 116, but the text still have a rotation of 118.

icon

Best answer by ebygomm 6 August 2019, 15:23

View original

6 replies

Userlevel 5
Badge +25

Maybe the TextPropertySetter

So how exactly are you creating this text? Where's that fme_rotation originally coming from?

Badge +12

Maybe the TextPropertySetter

So how exactly are you creating this text? Where's that fme_rotation originally coming from?

The text comes from a DWG-file, where the original rotation comes from. I want to manipulate that rotation. Even if I do change the rotation attribute value (fme_rotation or autocad_rotation), it does not change orientation rotation in the text location. Thus when writing back to dwg it uses the original rotation.

Userlevel 5
Badge +25

The text comes from a DWG-file, where the original rotation comes from. I want to manipulate that rotation. Even if I do change the rotation attribute value (fme_rotation or autocad_rotation), it does not change orientation rotation in the text location. Thus when writing back to dwg it uses the original rotation.

Okay, my TextPropertySetter does work if you're sending stuff to the Data Inspector, but not if you write back to a DWG.

The workaround is to first use a CoordinateExtractor to grab the x and y coordinates of the texts, then a Rotator to do the actual rotation, using the x and y coordinate as the rotation origin.

Userlevel 1
Badge +21

If you set autocad_original_rotation to the value you want, it will be written correctly in the DWG file

Badge +12

If you set autocad_original_rotation to the value you want, it will be written correctly in the DWG file

Thank you! that worked like a charm

Badge +12

Okay, my TextPropertySetter does work if you're sending stuff to the Data Inspector, but not if you write back to a DWG.

The workaround is to first use a CoordinateExtractor to grab the x and y coordinates of the texts, then a Rotator to do the actual rotation, using the x and y coordinate as the rotation origin.

Yeah, that's what I noticed as well. Thanks for helping!

Reply