Question

DGN text/label into line

  • 12 November 2014
  • 6 replies
  • 38 views

Hi everyone,

 

 

I have DGN file with text labels (geometry type text). I need to transform them into geometry type line. It means that forexample letter A is transform into 2 lines (/\\ -) or 3 lines ( / \\ -) and similarly wiht other letters.

 

GeometryCoercer transform it only into poit geometry type.

 

 

Any suggestions ?

 

 

Thanks a lot.

 

Anna

6 replies

Userlevel 4
Hi,

 

 

try the TextStroker.

 

 

David
Userlevel 4
Badge +13
HI,

 

There are several ways on how to do that.

 

1) you can extract the bbox of each text and

 

a. extract bbox centerline

 

b.extract the 'underline' of each bbox

 

c. extract lower bbox vertices to create 'underline'

 

2) extract text insertion point and extend to calculated point (based on text properties) to create line.

 

and probably other ways too....

 

Itay
Userlevel 4
Badge +13
unless you are interested in converting the fonts into lines.....:) and not to a line representing the text location, I would try David's suggestion.
Badge +3
If you want to write text object to dgn you dont need to convert it to graphics first.

 

You can use a Labelpointreplacer on the tekstattribute to wite it to the formatstring that contains the dgn_text object.

 

 

 

Here is a picture of a dwg writer doing the same:

 

 

 

 

As you can see the attribute is directly connected to the autocad_mtext_string after the labelpointreplacer is used on this attribute.

 

This example create a textlayer in autocad.

 

 

Microstation textstring attribute is "igds_text_string" wich you can expose on the dgn writer in the format_attributes tab.

 

 

FME readers and writer bible...

 

http://docs.safe.com/fme/html/FME_ReadersWriters/Default.htm#igds/Design_File_Quick_Facts.htm%3FTocPath%3DFME%20Readers%20and%20Writers%20(formats%20supported%20by%20FME%202014)%7CBentley%20MicroStation%20Design%20Reader%2FWriter%7C_____1

 

 
Thanks guys,

 

 

the TextStroker helped, not perfect but good enough.

 

 

. 

 

 

To Gio: I need to convert text into graphics! ;)

 

 

A.
Badge +3
I wonder how u manage to make em look that bad..

 

 

 

sufficient size and generalising variants.....

 

(botom one is text object)

Reply