Solved

Does FME use AutoCAD Text Style Properties from a template file and how to set the Annotative property

  • 4 January 2019
  • 9 replies
  • 44 views

Badge

I have a workspace that converts a DWG file to a new DWG utilizing a template file. However, I am unclear on how the text styles saved in the template file interact with multi text features written to the output DWG. I understand that the template file will overwrite any styling you set in the workspace for lines, polygons, and blocks. Does this also apply to text?

Here are the details, In my workspace I set the text style with the property autocad_shape_name to a corresponding style in the autocad template file. Also, the multi text features are put on a layer that exists in the template file. I have been trying to modify two attributes in the text features that are found in autocad (Annotative, and Defined Width), see the image below showing these properties highlighted in AutoCAD.

However, I can't seem to set these attributes at all. Theoretically, if fme utilizes text styles from a template file, the "Annotative" property should be set correctly in the ouput (it's not) by the text style I have set. Also, I am not sure what the fme attribute equivalent of "Annotative" is, if there even is an equivelant. Is there some way these two attributes are getting overwritten by a Style or a layer saved in the template file? Any insight you can provide to working the text styles in AutoCAD template files would be greatly appreciated, or any insight into setting the Annotative property or the Defined Width property.

icon

Best answer by chrisatsafe 11 January 2019, 20:25

View original

9 replies

Badge +10

@kiahwarren

Did you try the tutorials on this page?

DWGStyler

happy fme-ing :-)

srg

Badge

@kiahwarren

Did you try the tutorials on this page?

DWGStyler

happy fme-ing :-)

srg

Thanks for your reply @srg, yes I did try the DWGStyler but it does not seem to work for this situation. I am guessing it is because of the template file, but cannot be sure because I have yet to find documentation on how fme interacts with text styles in DWT template files.

Badge +1

Hi,

I am not sure this will help but see the document on autocad_anno_force_visible

here https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/acad/Multi_Text_Entities.htm?Highlight=%22annotative%22

 

Badge +10

Thanks for your reply @srg, yes I did try the DWGStyler but it does not seem to work for this situation. I am guessing it is because of the template file, but cannot be sure because I have yet to find documentation on how fme interacts with text styles in DWT template files.

@kiahwarren

May be the AutoCAD RW documentation

AutoCAD DWG/DXF Reader Writer Documentation

Even better would be the Text Entities in AutoCAD

hope that helps

happy fme-ing :-)

srg

Badge

@kiahwarren

May be the AutoCAD RW documentation

AutoCAD DWG/DXF Reader Writer Documentation

Even better would be the Text Entities in AutoCAD

hope that helps

happy fme-ing :-)

srg

Hi @srg, thanks for your ideas. I have already checked out the documentation on the DWG writer, as well as the specific documentation on text entities and multi text entities. As well, I have also read through the article "Reading and Writing AutoCAD Text & MText Features". Unfortunately, none of the documentation mentions anything about text styles in template files, or the annotative property for multi text.

Badge

Hi,

I am not sure this will help but see the document on autocad_anno_force_visible

here https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/acad/Multi_Text_Entities.htm?Highlight=%22annotative%22

 

Hi @zubairsm, thanks for the idea. I already tried setting the autocad_anno_force_visible attribute but it doesn't have any effect.

Badge +2

Hi @kiahwarren,

It looks there might be a workaround using a combination of the provided answers.

Using a DWGStyler, specify the DWG Template File and select the Text option. Next, in the Text section, specify the Text Entity Type as Text and chose the Text Shape Name (the list of shape names is pulled from the template file). This will create the text feature and ensure the correct style is used - you can also specify your Text Justification here if you want. Next, define your annotation scale - from what I understand this has to be any scale other than 1:1 unless you have more than 1 scale set.

Next, add an AttributeManager and add the following AutoCAD DWG Format Attributes and Attribute Values to convert the feature to multiline text and set the Defined Width:

Output AttributeAttribute Valueautocad_entity

 

autocad_multi_text

 

autocad_mtext_ref_rect_width

 

<set your desired Defined Width)

 

Lastly, in the DWG writer parameters set the template file to the same template that you specified in the DWGStyler to ensure the style is set correctly. That should make the output look like this:

I hope this information helps clarify some things - some good tips and explanations about working with templates/text are given in the AutoCAD Transformation tutorials.

Badge

Hi @kiahwarren,

It looks there might be a workaround using a combination of the provided answers.

Using a DWGStyler, specify the DWG Template File and select the Text option. Next, in the Text section, specify the Text Entity Type as Text and chose the Text Shape Name (the list of shape names is pulled from the template file). This will create the text feature and ensure the correct style is used - you can also specify your Text Justification here if you want. Next, define your annotation scale - from what I understand this has to be any scale other than 1:1 unless you have more than 1 scale set.

Next, add an AttributeManager and add the following AutoCAD DWG Format Attributes and Attribute Values to convert the feature to multiline text and set the Defined Width:

Output AttributeAttribute Valueautocad_entity

 

autocad_multi_text

 

autocad_mtext_ref_rect_width

 

<set your desired Defined Width)

 

Lastly, in the DWG writer parameters set the template file to the same template that you specified in the DWGStyler to ensure the style is set correctly. That should make the output look like this:

I hope this information helps clarify some things - some good tips and explanations about working with templates/text are given in the AutoCAD Transformation tutorials.

Thank you @ChrisAtSafe that did the trick!

I know this question is four-years old now, but I was struggling with exactly this issue today - so it's obviously still a problem. And since I hated all of the answers here I thought I would post what worked for me.

 

In the DWGStyler where you define the annotation scale, if you only define a single scale for your text then despite the text style chosen, Autocad thinks they shouldn't be actually be annotative and sets Annotative = NO, as shown in the opening post above. But if you define more than one annotation scale then Autocad knows that you really mean it and will set Annotative = YES.

 

image

Reply