Skip to main content
Solved

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


Forum|alt.badge.img

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.

Best answer by chrisatsafe

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.

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

9 replies

srg
Forum|alt.badge.img+10
  • January 8, 2019

@kiahwarren

Did you try the tutorials on this page?

DWGStyler

happy fme-ing :-)

srg


Forum|alt.badge.img
  • Author
  • January 8, 2019
srg wrote:

@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.


Forum|alt.badge.img+1
  • January 9, 2019

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

 


srg
Forum|alt.badge.img+10
  • January 9, 2019
kiahwarren wrote:

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


Forum|alt.badge.img
  • Author
  • January 9, 2019
srg wrote:

@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.


Forum|alt.badge.img
  • Author
  • January 9, 2019
zubairsm wrote:

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.


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • Best Answer
  • January 11, 2019

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.


Forum|alt.badge.img
  • Author
  • January 16, 2019
chrisatsafe wrote:

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!


garyb
Contributor
Forum|alt.badge.img+5
  • Contributor
  • August 19, 2022

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


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