Question

DGN writer text: set font by name


Userlevel 3
Badge +12

Hi,

 

Is there a way to set the font of a text in a DGN file by using the font name?

With the DGNStyler you can only set the font by the font number.

 

In this post, https://community.safe.com/s/article/microstation-text-styles-in-fme , there's a workflow described. Basically, in microstation you add a text object for every desired font in the seedfile. In this way, a font number for each desired font is stored in the seedfile. Next, you read this seedfile with FME, to inspect all igds_font values. Still, there is no "igds_font_name" kind of attribute. So you should use the font name as the text value in the seedfile, I think. Once you extracted this mapping (font name <> font number), you remove all these text objects again from the seedfile.

 

But for the workspace I am working on, we want the seedfile as an input/ user parameter, so this file is not fixed. So everytime a new seedfile is used, the mapping should be prepared manually. I am hoping for a better and more dynamic solution. Any ideas? Is there a "igds_" attribute (for writing) I am missing?

 

Jasper

 

 

 

 

 

 


3 replies

Userlevel 2
Badge +10

@Jasper Wisbecq​ FME only works with the font numbers that are stored in the seedfile. Unfortunately, there is no such igds_font_name attribute that will tell you the name of the font. For the full list of text string parameters, please check here. If you think FME could benefit from functionality such as this, then I recommend submitting an Idea on our Ideas page, where users can submit, vote and even get their ideas developed & integrated into the FME platform.

 

Additionally, I found a website that explains how you may be able to query the for corresponding font name to each number using Bentley's API: https://www.bimsdks.com/bentley/MicroStationAPI/structBentley_1_1DgnPlatform_1_1DgnFontNumMap.html#a2e315a3a25ed3481e96abdf7538749ab

Userlevel 3
Badge +12

@danminneyatsaf​ Thank you for looking into this. I'll post an idea, and see if it gets any votes.

Userlevel 3
Badge +12

idea: https://community.safe.com/s/bridea/a0r4Q00000IoJBLQA3/set-dgn-text-font-by-name

Reply