Skip to main content
Question

DGN text/label into line

  • November 12, 2014
  • 6 replies
  • 121 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

david_r
Evangelist
  • November 12, 2014
Hi,

 

 

try the TextStroker.

 

 

David

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 12, 2014
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

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 12, 2014
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.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • November 12, 2014
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

 

 

  • Author
  • November 13, 2014
Thanks guys,

 

 

the TextStroker helped, not perfect but good enough.

 

 

. 

 

 

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

 

 

A.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • November 13, 2014
I wonder how u manage to make em look that bad..

 

 

 

sufficient size and generalising variants.....

 

(botom one is text object)

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