Skip to main content
Solved

Formatting autocad text features


Forum|alt.badge.img

Hi guys,

I'm trying some autocad text features formatting. So, I have a number of text features at their insertion coords. I want those to be formatted like they are aligned in some text editor and I want it in DWG output if possible.

I have:

100 200

390 420

210 333

Of course, this is only a sketch. There can be up to 300-400 text feaures at their locations.

I want them to be aligned like this:

100

200

390

420

etc.

Possibly in DWG format. If not possible, some other solution that can be copied to DWG is also an option.

Thanks in advance.

Best regards

Best answer by lars_de_vries

Hi @jjaksic22,

if you want a single list for all coördinates, you could use an Aggregator transformer. You can select the autocad_text_string or fme_text_string attribute under 'Attributes to Concatenate'. Next as a Separator Character you open the Text Editor and change the comma in a hard return.

You'll have your list ready. You just need to rename the attribute to autocad_mtext_string.

I hope this solves your issue.

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

9 replies

lars_de_vries
Forum|alt.badge.img+10

Hi @jjaksic22,

I think there a few options. You can change set the horizontal alignment of text features in AutoCAD using the autocad_justification attribute. Look for this method here: Autocad text entitities

 

The other option would be to use Mtext entities, which allow for multiple rows within a single element. You can find more about the attributes of those here: Autocad multi text enitities

I hope this will work for you.

 


zzupljanin
Contributor
Forum|alt.badge.img+4
  • Contributor
  • July 27, 2017

I'm not sure I understand. If puting the 2nd number under the first one, a simple StringReplacer (change <space> sign to <newline> sign) followed by DWGStyler (choose Multi-Text) will do the trick.

Also DWGStyler already has Justification drop-down menu if necesary.

Please tell me if it's something else.


Forum|alt.badge.img
  • Author
  • July 27, 2017
zzupljanin wrote:

I'm not sure I understand. If puting the 2nd number under the first one, a simple StringReplacer (change <space> sign to <newline> sign) followed by DWGStyler (choose Multi-Text) will do the trick.

Also DWGStyler already has Justification drop-down menu if necesary.

Please tell me if it's something else.

hi @zzupljanin, wish it was that simple. Unfortunately. the sketch I wrote in question looked different when I was typing post. Actually, input file is DWG with text labels at different coordinates, scattered all over the area. I want to rearrange labels in manner of a list, one below previous.

 


zzupljanin
Contributor
Forum|alt.badge.img+4
  • Contributor
  • July 27, 2017
zzupljanin wrote:

I'm not sure I understand. If puting the 2nd number under the first one, a simple StringReplacer (change <space> sign to <newline> sign) followed by DWGStyler (choose Multi-Text) will do the trick.

Also DWGStyler already has Justification drop-down menu if necesary.

Please tell me if it's something else.

is this what you're looking for?

 

 

from

to


Forum|alt.badge.img
  • Author
  • July 27, 2017

Mine first post was confusing. Here is what I want:

From

To

Hope this can be achieved. Sorry for your time lost.


lars_de_vries
Forum|alt.badge.img+10

Hi @jjaksic22,

if you want a single list for all coördinates, you could use an Aggregator transformer. You can select the autocad_text_string or fme_text_string attribute under 'Attributes to Concatenate'. Next as a Separator Character you open the Text Editor and change the comma in a hard return.

You'll have your list ready. You just need to rename the attribute to autocad_mtext_string.

I hope this solves your issue.


Forum|alt.badge.img
  • Author
  • July 27, 2017

Thanks @lars_de_vries. This is close to a solution. In attribute autocad_mtext_string I get exactly what I need. From FME Data Inspector I can copy all the text to Autocad MTEXT. That works. The problem is with DWG WRITER. I've got a block reference with all the features at their original locations while I want one feature with content of the autocad_mtext_string attribute. Can this be solved too?

Thanks for the effort.


lars_de_vries
Forum|alt.badge.img+10

Hi @jjaksic22,

If it is about writing mtext instead of blocks, I think you will have to set the attribute 'autocad_entity' to value 'autocad_multi_text'.

If you are reading blocks, you should turn on the reader parameter 'Explode Blocks into Entities'.

I hope this solves your issue.


Forum|alt.badge.img
  • Author
  • July 28, 2017
lars_de_vries wrote:

Hi @jjaksic22,

if you want a single list for all coördinates, you could use an Aggregator transformer. You can select the autocad_text_string or fme_text_string attribute under 'Attributes to Concatenate'. Next as a Separator Character you open the Text Editor and change the comma in a hard return.

You'll have your list ready. You just need to rename the attribute to autocad_mtext_string.

I hope this solves your issue.

Thanks @lars_de_vries. This was correct, although I needed a solution for a single point geometry. I got that from https://knowledge.safe.com/questions/35796/how-to-aggregate-into-single-point-features.html. Thanks, you've been great help.

 

Best regards

 


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