Skip to main content

Hi, I have a dataset with features containing three attributes. Each feature contains a text string such as SAINT PATRICK'S CLOSE (see below)

or 'stacked' text, which contains carriage return and line feeds such as Saint Patrick's Cathedral (see below).

Using the complex example provided by Safe i've created Tags for each attribute. Basically I need to retain the GUID, FORM_ID and FUNC_ID values on each feature in the DGN.

When I write out the DGN file, all works perfectly with the liner text string. It retains the GUID etc tags and values. See below.

The feature with the stacked text string gets split into five elements - one of each line of text and one for each carriage return/line feed.

This would be ok, but none of the five output elements have any tags. I assumed each element would have retained their GUI, FORM_ID and FUNC_ID tags when written, but it seems all tags have been stripped instead.

Is there any way to retain the required tags even though my feature gets split into multiple elements? Or better still, ensure that the feature doesn't get split?

I've created a testing workspace in FME 2017.1:

I've tried numerous settings on the writer, tried tweaking the carriage return/line feed values etc. My experience of working with DGN and Tags is limited, so maybe its something small i'm missing but I can't figure it out. So any suggestions are appreciated!

Cheers, Tony

Hi tkent, i was able to successfully write the tags for multi-line strings in the dgn directly. But doing it via a FeatureReader and FeatureWriter is not giving the desired results. I have attached the modified workbench and the resultant dgn file. If you want to increase the igds_text_size, you will have to increase the value in igds_text_elements{1}.y and double the value in igds_text_elements{2}.y. Hope it helps.anno-stackedlabelissue-testing-modified.fmwtmapinfo-test.zip


Thanks @bb, Looking at the output dgn, I think that is something along the lines of what I require alright. I can't run the run workspace fully though, I think you may be using a newer version of FME? Would you mind sending me on screenshot of your Tester transformer settings? Or let me know what FME version you are using? Thanks for your help! Cheers, Tony


Thanks @bb, Looking at the output dgn, I think that is something along the lines of what I require alright. I can't run the run workspace fully though, I think you may be using a newer version of FME? Would you mind sending me on screenshot of your Tester transformer settings? Or let me know what FME version you are using? Thanks for your help! Cheers, Tony

I have used FME 2018.1 32-bit. If you want i will re-send the workbench in another version. Please mention the version you are using. I have separated the igds_text_string attribute based on \\n or \\r (new line or carriage return), so that these texts will be assigned igds_type=igds_multi_text and one line text will be assigned igds_type=igds_texttester.png

 

 


I have used FME 2018.1 32-bit. If you want i will re-send the workbench in another version. Please mention the version you are using. I have separated the igds_text_string attribute based on \\n or \\r (new line or carriage return), so that these texts will be assigned igds_type=igds_multi_text and one line text will be assigned igds_type=igds_texttester.png

 

 

Thanks bb, I got it working there now. Unfortunately I don't think the solution will work for me though. I noticed that the Y location are effectively hard coded respective to the original element. I'd have to retain precisely the original text location, size etc. If a stacked text element was rotated (similar to the linear text in the example), i'd almost have to manually adjust the X, Y values taking into account text size and rotation angles. That'd be too much work considering the number of features we have. Thanks for your suggestions though!

 

 


Thanks @bb, Looking at the output dgn, I think that is something along the lines of what I require alright. I can't run the run workspace fully though, I think you may be using a newer version of FME? Would you mind sending me on screenshot of your Tester transformer settings? Or let me know what FME version you are using? Thanks for your help! Cheers, Tony

Hi tkent, if u are still working on this issue, please find the attached fmwt. This one writes the stacked text with tags. But has one limitation, if we increase the text size, the text strings overlap with each other. You can give it a shot. Also, i have added DWG FeatureReader & FeatureWriter instead of DGN. anno-stackedlabelissue-testing-modified-13apr.fmwt

 

 


Hi tkent, if u are still working on this issue, please find the attached fmwt. This one writes the stacked text with tags. But has one limitation, if we increase the text size, the text strings overlap with each other. You can give it a shot. Also, i have added DWG FeatureReader & FeatureWriter instead of DGN. anno-stackedlabelissue-testing-modified-13apr.fmwt

 

 

Thanks bb, just had a look at this and it looks promising. Would it be possible that you could save the workspace in FME 2017.1? I'm still on that version, waiting on IT to upgrade me, so i'm losing 4 or 5 transformers when I open. Thanks again for your help with this!

 

 


Thanks @bb, Looking at the output dgn, I think that is something along the lines of what I require alright. I can't run the run workspace fully though, I think you may be using a newer version of FME? Would you mind sending me on screenshot of your Tester transformer settings? Or let me know what FME version you are using? Thanks for your help! Cheers, Tony

I have 2017.1 64-bit version installed, in which i have saved the fmwt. 32-bit version does not support Autocad map 3D Object Data Reader/Writer, hence, had to opt for 64-bit. See how it works.mapinfo2dgnv8-2017-64bit.fmwt

Hi @tkent,

I built upon @bb's example to produce a more generic workspace, that will automatically scale and rotate the output multi-text for you.

m-anno-stackedlabelissue-testing.fmw


Hi @tkent,

I built upon @bb's example to produce a more generic workspace, that will automatically scale and rotate the output multi-text for you.

m-anno-stackedlabelissue-testing.fmw

Just getting back to this, and done a quick test. Looks good so far! I'm not entirely sure I understand the process, but it seems to work ok. I'll dig a little deeper and figure out what's going on in the background. Thanks @DaveAtSafe and @bb for all your help.

 

 


Reply