Skip to main content

I am working on an AutoCAD to AutoCAD conversion where I am changing the text of text and Mtext objects and writing out the changes. The AutoCAD writer uses the input file as a template as the only parts I want to change are the text elements (whether text/mtext/attributes in a block).

 

I am having a problem where Text entities (autocad_entity = autocad_text) are being written as MText entities in the output which is effecting the positioning of the text. This is happening for all text entities (autocad_text), where I have and haven't made changes

 

Is there any reason why text entities would be written as Mtext, when they are clearly defined as text entities in FME? I have posted some images of before and after below for reference:

Text Settings in FME just before writing

Original Text Settings in FME just before writingAutoCAD file read into FME

Input AutoCAD fileAutoCAD file written from FME

Written AutoCAD File

OK this is a bit of a long shot but...

 

I found this in the doc for "autocad_true_type_font":

 

"The name of the TrueType font used to display the text string.

For text entities, this attribute is only used by the AutoCAD writer, since single-line text entities do not have support for TrueType fonts.

If this attribute is specified on an autocad_text feature, a multiline text entity will be created and written instead of a single-line text entity."

 

In your screen shot it looks like the "autocad_true_type_font" is set to null - Maybe try any use a NullAttributeMapper to map it to missing to see if that helps.

 

Regardless I suspect somewhere in there is a parameter which is cuaing these text features to get converted - it's just a case of hunting it down...


Try the DWGEntitySetter custom transformer from the hub.


Try the DWGEntitySetter custom transformer from the hub.

All that does I think is set the "autocad_entity" attribute - in this case the attribute is already set correctly. It looks like the writer is doing some extra stuff somewhere to overrule this format attribute


@virtualcitymatt​ thank you so much, mapping the "autocad_true_type_font" from null to missing worked!


@virtualcitymatt​ thank you so much, mapping the "autocad_true_type_font" from null to missing worked!

Ahh great stuff - silly that a value of null is enough to break it here. maybe someone at safe can add a ticket to the system to have this fixed or something. @andreaatsafe​ ?

 

At least there is a work around for this


Reply