Question

DGN seed reading. What attribute ties them together?

  • 16 February 2017
  • 17 replies
  • 12 views

Badge

Hi there,

I'm trying to convert a set of shapefiles to DGN (microstationV8) format. I do have a Seed file which I can specify in the writers. However, I'm not sure how to actually read the seed.

Truth is, I don't quite understand what attribute relates the source data to an entry in the seed file. My mind says that if the seed has an entry for a blue line classified as "motorway", I still need to specify what in my shapefiles qualify as "motorways".

Is it perhaps based on the name of each writer? Or am I misunderstanding these DGN seed files completely?

What I do understand is the the Seed functions as a template. Still, as with any template, there must be some kind of attribute that dies the seed to the designated feature.

Any help on the topic will be greatly appreciated.


17 replies

Badge +16

Hi @robbie_botha, the fme_feature_type attribute is the one you are searching for.

So if you set it to the name of the layer\\level in your seedfile FME will match the seedfile properties to the result dgn level.

Another place to use the seedfile is in the DGNStyler, to define cells and such.

Hope this helps.

Badge

Hi @itay,

Thanks for the swift response. I think I'm still missing something, because doing that seems to fail.

So step by step (just to test it) here's what I've currently got connected up in FME

  1. Shape reader containing road network
  2. AttributeExposer to expose fme_feature_type
  3. AttributeCreator to set fme_feature_type to the new value based on the Seed file
  4. Dynamic DGN writer (it auto sets to "fme_feature_type", I should have seen that as a hint :) )

The problem I have is at the new value based off the seed file. Whatever I choose (as you describe, "layer/level") gets ignored completely, and my output still ends up un-formatted black lines. Here is an example of "Minor ramps" which I'm trying to set my source to (lots of text). All the ones marked as bold, I've tried setting to the fme_feature_type, with no success:

Feature Type 5

Coordinate System Unknown

Dimension 2D

Number of Vertices 1

Min Extents 3437437.5542422365, 7094051.18513186

Max Extents 3437617.5542422365, 7094071.18513186

Attributes (67)

fme_color (string) 1,0.698039215686274,0

fme_geometry (string) fme_point

fme_rotation (64 bit real) 0.0

fme_text_size (64 bit real) 20.0

fme_text_string (encoded: cp1252) 15 RAMPS MINOR RDS

fme_type (string) fme_text

igds_basename (string) 09_SEED_FILE_TRANS-NEW

igds_class (32 bit unsigned integer) 0

igds_color (32 bit integer) 12

igds_color.blue (32 bit integer) 0

igds_color.green (32 bit integer) 178

igds_color.red (32 bit integer) 255

igds_date_last_modified (string) 20160503 01:27:28AM

igds_element_id (string) 28741

igds_element_locked (string) no

igds_element_modified (string) yes

igds_element_new (string) yes

igds_element_priority (32 bit integer) 0

igds_element_type (32 bit unsigned integer) 17

igds_element_view_independent (string) no

igds_element_visibility (string) yes

igds_font (32 bit unsigned integer) 195

igds_graphic_group (32 bit unsigned integer) 0

igds_insertion_x (64 bit real) 3437437.5542422365

igds_insertion_y (64 bit real) 7094061.18513186

igds_justification (32 bit integer) 2

igds_level (32 bit unsigned integer) 5

igds_level_comment (string) RAMP - MINOR RDS

igds_level_name (string) Level 15

igds_lower_x (64 bit real) 3437437.5542422365

igds_lower_y (64 bit real) 7094051.18513186

igds_max_used_string_len (16 bit unsigned integer) 18

igds_model_id (32 bit unsigned integer) 0

igds_model_name (string) Default

igds_original_justification (16 bit unsigned integer) 1

igds_rotation (64 bit real) 0.0

igds_snappable (string) yes

igds_string_len (64 bit real) 296.671142578125

igds_style (32 bit integer) 0

igds_style_name (encoded: utf-16le) STANDARD_LSTYLE_0

igds_text_size (64 bit real) 20.0

igds_text_string (encoded: cp1252) 15 RAMPS MINOR RDS

igds_text_width_multiplier (64 bit real) 21.0

igds_textstyle_bold (boolean) No

igds_textstyle_char_spacing (64 bit real) 0.0

igds_textstyle_codepage (32 bit unsigned integer) 1252

igds_textstyle_exflags (32 bit unsigned integer) 0

igds_textstyle_font (32 bit unsigned integer) 0

igds_textstyle_id (32 bit unsigned integer) 0

igds_textstyle_overline (boolean) No

igds_textstyle_overrides_style1 (32 bit unsigned integer) 0

igds_textstyle_overrides_style2 (32 bit unsigned integer) 0

igds_textstyle_tnode_word_wrap_len (64 bit real) 0.0

igds_textstyle_txflags (16 bit unsigned integer) 512

igds_textstyle_underline (boolean) No

igds_type (string) igds_text

igds_upper_x (64 bit real) 3437734.2253848147

igds_upper_y (64 bit real) 7094071.18513186

igds_weight (32 bit integer) 0

igds_xhigh (64 bit real) 3437734.2253848147

igds_xlow (64 bit real) 3437437.5542422365

igds_yhigh (64 bit real) 7094071.18513186

igds_ylow (64 bit real) 7094051.18513186

igds_zhigh (32 bit integer) 2147483647

igds_zhigh_uor (32 bit integer) 2147483647

igds_zlow (32 bit integer) -2147483648

igds_zlow_uor (32 bit integer) -2147483648

IFMEText 15 RAMPS MINOR RDS

Encoding Name cp1252

Text Rotation (degrees CCW) 0.0

Text Size 20.0

Text Location As Point 3437437.5542422365, 7094051.18513186

Text Location: IFMEPoint 3437437.5542422365, 7094051.18513186

 

So I'm still not sure which one of those many attributes to use from the SEED, but unless I'm doing something else wrong, none of the boldened ones work.

Thanks in advance,

Badge +16

Hi @itay,

Thanks for the swift response. I think I'm still missing something, because doing that seems to fail.

So step by step (just to test it) here's what I've currently got connected up in FME

  1. Shape reader containing road network
  2. AttributeExposer to expose fme_feature_type
  3. AttributeCreator to set fme_feature_type to the new value based on the Seed file
  4. Dynamic DGN writer (it auto sets to "fme_feature_type", I should have seen that as a hint :) )

The problem I have is at the new value based off the seed file. Whatever I choose (as you describe, "layer/level") gets ignored completely, and my output still ends up un-formatted black lines. Here is an example of "Minor ramps" which I'm trying to set my source to (lots of text). All the ones marked as bold, I've tried setting to the fme_feature_type, with no success:

Feature Type 5

Coordinate System Unknown

Dimension 2D

Number of Vertices 1

Min Extents 3437437.5542422365, 7094051.18513186

Max Extents 3437617.5542422365, 7094071.18513186

Attributes (67)

fme_color (string) 1,0.698039215686274,0

fme_geometry (string) fme_point

fme_rotation (64 bit real) 0.0

fme_text_size (64 bit real) 20.0

fme_text_string (encoded: cp1252) 15 RAMPS MINOR RDS

fme_type (string) fme_text

igds_basename (string) 09_SEED_FILE_TRANS-NEW

igds_class (32 bit unsigned integer) 0

igds_color (32 bit integer) 12

igds_color.blue (32 bit integer) 0

igds_color.green (32 bit integer) 178

igds_color.red (32 bit integer) 255

igds_date_last_modified (string) 20160503 01:27:28AM

igds_element_id (string) 28741

igds_element_locked (string) no

igds_element_modified (string) yes

igds_element_new (string) yes

igds_element_priority (32 bit integer) 0

igds_element_type (32 bit unsigned integer) 17

igds_element_view_independent (string) no

igds_element_visibility (string) yes

igds_font (32 bit unsigned integer) 195

igds_graphic_group (32 bit unsigned integer) 0

igds_insertion_x (64 bit real) 3437437.5542422365

igds_insertion_y (64 bit real) 7094061.18513186

igds_justification (32 bit integer) 2

igds_level (32 bit unsigned integer) 5

igds_level_comment (string) RAMP - MINOR RDS

igds_level_name (string) Level 15

igds_lower_x (64 bit real) 3437437.5542422365

igds_lower_y (64 bit real) 7094051.18513186

igds_max_used_string_len (16 bit unsigned integer) 18

igds_model_id (32 bit unsigned integer) 0

igds_model_name (string) Default

igds_original_justification (16 bit unsigned integer) 1

igds_rotation (64 bit real) 0.0

igds_snappable (string) yes

igds_string_len (64 bit real) 296.671142578125

igds_style (32 bit integer) 0

igds_style_name (encoded: utf-16le) STANDARD_LSTYLE_0

igds_text_size (64 bit real) 20.0

igds_text_string (encoded: cp1252) 15 RAMPS MINOR RDS

igds_text_width_multiplier (64 bit real) 21.0

igds_textstyle_bold (boolean) No

igds_textstyle_char_spacing (64 bit real) 0.0

igds_textstyle_codepage (32 bit unsigned integer) 1252

igds_textstyle_exflags (32 bit unsigned integer) 0

igds_textstyle_font (32 bit unsigned integer) 0

igds_textstyle_id (32 bit unsigned integer) 0

igds_textstyle_overline (boolean) No

igds_textstyle_overrides_style1 (32 bit unsigned integer) 0

igds_textstyle_overrides_style2 (32 bit unsigned integer) 0

igds_textstyle_tnode_word_wrap_len (64 bit real) 0.0

igds_textstyle_txflags (16 bit unsigned integer) 512

igds_textstyle_underline (boolean) No

igds_type (string) igds_text

igds_upper_x (64 bit real) 3437734.2253848147

igds_upper_y (64 bit real) 7094071.18513186

igds_weight (32 bit integer) 0

igds_xhigh (64 bit real) 3437734.2253848147

igds_xlow (64 bit real) 3437437.5542422365

igds_yhigh (64 bit real) 7094071.18513186

igds_ylow (64 bit real) 7094051.18513186

igds_zhigh (32 bit integer) 2147483647

igds_zhigh_uor (32 bit integer) 2147483647

igds_zlow (32 bit integer) -2147483648

igds_zlow_uor (32 bit integer) -2147483648

IFMEText 15 RAMPS MINOR RDS

Encoding Name cp1252

Text Rotation (degrees CCW) 0.0

Text Size 20.0

Text Location As Point 3437437.5542422365, 7094051.18513186

Text Location: IFMEPoint 3437437.5542422365, 7094051.18513186

 

So I'm still not sure which one of those many attributes to use from the SEED, but unless I'm doing something else wrong, none of the boldened ones work.

Thanks in advance,

none2dgnv8.fmw example ws where the color is defined via an attribute ( dont have a seed file and each feature is written to a separate level >writer type fan out on fme_feature_type)

 

 

The fme_feature_type should match the igds_level_name to be able to get the seed properties, just make sure you are pointing to your seed file in the writer parameters (navigator window) and not the standard FME seed file.

 

 

 

Badge

Hi @Itay,

Indeed, your workspace and the DGNstyler makes perfect sense. I have also been able to set individual colors for layers. Sadly, still no luck in reading the Seed. I did check that the writer parameter is indeed set to my custom seed instead of the FME default, and all is indeed set correctly there.

So everything looks fine, but the result is still incorrect. by using the attribute you describe above, setting the fme_feature_type to "Level 15" should result in orange lines (as read from the seed). Still, all I get is black, unformatted lines. I even tested by changing the igds_color attribute in fme to an orange color, and that does in fact work. So I can display color, nothing is wrong on that front.

The issue remains of reading this from the seed, as my seed (with the minor ramps shown above as an example) contains about 80 entries, all with different line sizes and colors.

So doing it manually is a possibility, however time constraints and room for error is still a huge problem, so I'd really like to find a way to read the seed instead.

Any other ideas?

Thanks again for all the help.

Badge +16

Hi @Itay,

Indeed, your workspace and the DGNstyler makes perfect sense. I have also been able to set individual colors for layers. Sadly, still no luck in reading the Seed. I did check that the writer parameter is indeed set to my custom seed instead of the FME default, and all is indeed set correctly there.

So everything looks fine, but the result is still incorrect. by using the attribute you describe above, setting the fme_feature_type to "Level 15" should result in orange lines (as read from the seed). Still, all I get is black, unformatted lines. I even tested by changing the igds_color attribute in fme to an orange color, and that does in fact work. So I can display color, nothing is wrong on that front.

The issue remains of reading this from the seed, as my seed (with the minor ramps shown above as an example) contains about 80 entries, all with different line sizes and colors.

So doing it manually is a possibility, however time constraints and room for error is still a huge problem, so I'd really like to find a way to read the seed instead.

Any other ideas?

Thanks again for all the help.

I agree that using the seed is the most efficient way. Is it possible for you to post a sample of your data and a sample seed file?

 

Another option is to open a support case at : https://www.safe.com/support/

 

 

Badge

Hi @itay

Here is my seed file:

09-seed-file-trans-new.dgn

I'm not going to add an example of my source shape file just yet, because in practice, any shape file (or any source geometry layer for that matter) should do. If you can map anything to the seed I attached above to take it's color and style, then any source should be fine.

If all else fails, I'll create a geometry sample for you in shape format, but even if you use a creator and you are able to map different things to this seed successfully, then the issue should be resolved.

Thanks,

Badge +16

Hi @itay

Here is my seed file:

09-seed-file-trans-new.dgn

I'm not going to add an example of my source shape file just yet, because in practice, any shape file (or any source geometry layer for that matter) should do. If you can map anything to the seed I attached above to take it's color and style, then any source should be fine.

If all else fails, I'll create a geometry sample for you in shape format, but even if you use a creator and you are able to map different things to this seed successfully, then the issue should be resolved.

Thanks,

I think its because your seed file is a V7 dgn can you try with a V8?

 

 

Badge

I had not realized that it was a v7 file.

However, I did a conversion to v8, and and also tried writing to v7 and v8, both give me incorrect results.

Are you able to map anything with the seed file provided?

Badge +16

I had not realized that it was a v7 file.

However, I did a conversion to v8, and and also tried writing to v7 and v8, both give me incorrect results.

Are you able to map anything with the seed file provided?

No but I did notice that if you try it with a V7 writer it does not get accepted so I think there is something with the seed file.

 

 

I would suggest creating a new simple seed file with just one level in it and try that, if that doesnt work I would advise you to contact Safe.

 

 

 

Badge

Okay thanks, will give it a shot.

Badge +1

Hi @robbie_botha, the fme_feature_type attribute is the one you are searching for.

So if you set it to the name of the layer\\level in your seedfile FME will match the seedfile properties to the result dgn level.

Another place to use the seedfile is in the DGNStyler, to define cells and such.

Hope this helps.

Hi @itay I am having similar issues in that my SEED file does not seem to be recognized. I have added it to the Seed file parameter and also set the fme_feature_type attribute to the attribute which contains the level names but this hasn't fixed it. Is there anywhere else I need to set the SEED file?

Badge

Hi @robbie_botha

apparently, your seed-file is not set up properly to make it really convenient to use.

Let's take a look at the feature that represents major roads (light orange unsealed). All major roads (light orange unsealed) are supposed to be written on level Level 26A and appear in light orange (color 46) with linestyle 3 and line weight 4. To make these visual attributes easy to reuse, you could set default style for the Level 26A through MicroStation Level Manager:

After the seed-file is altered, you can write any feature on Level 26A with ByLevel color, linestyle, and line weight. This is what you would need in your workspace:

  • igds_level = Level 26A added to the feature

  • color, linestyle, and line weight set to ByLevel

  • destination feature type Level Name set to igds_level

Please take a look at the attached workspace. I also attach your original seed-file with adjusted Level 26A default style and sample output.dgn.

none2dgnv8.fmw

6518-09-seed-file-trans-new.dgn

output.dgn

Badge +1

Hi @lenaatsafe In the past I have been able to use a Seed file in terms of setting the, lineweights, colors etc to show up as per the settings in the Seed file. However this does not always work and I was wondering if there is some other setting I need to configure to ensure this always works. Reading through the answers on this forum question I am still a bit confused as to the difference between igds_level and igds_level_name and was wondering if this has an impact on whether the Seed file works. I did notice that in your example you set igds_level to 'Level 26A' however igds_level appears to be of integer type which has confused me.

Also, even when I do get the colors, lineweights, etc to work from the Seed file, I am unable to get any of the content within the Seed file such as the Title block , to appear in the output DGN. Is there a way to ensure this content comes through?

Thanks

Badge

Hi @lenaatsafe In the past I have been able to use a Seed file in terms of setting the, lineweights, colors etc to show up as per the settings in the Seed file. However this does not always work and I was wondering if there is some other setting I need to configure to ensure this always works. Reading through the answers on this forum question I am still a bit confused as to the difference between igds_level and igds_level_name and was wondering if this has an impact on whether the Seed file works. I did notice that in your example you set igds_level to 'Level 26A' however igds_level appears to be of integer type which has confused me.

Also, even when I do get the colors, lineweights, etc to work from the Seed file, I am unable to get any of the content within the Seed file such as the Title block , to appear in the output DGN. Is there a way to ensure this content comes through?

Thanks

Hi @aquamarine

are you dealing with DGN v7 or DGN v8? As far as I recall, in v8, igds_level as actually level name rather than level number. It is quite not easy to get to level numbers in v8 (in MicroStation). Level numbers seem to be an obsolete concept now. In v7, igds_level is level number while igds_level_name is level name.

If you set fanout on the destination feature type, you can use igds_level for v8 or igds_level_name for v7 as the fanout attribute. The key is to have the correct values in these attributes on the features.

If you do work with v7 seed-file, let's take a look and compare. Is your desired output in v7?

Re the content of the seed file: only the file header is copied, i.e. other elements are not supposed to be transferred into the new file. If you need e.g. seed-file Title Block, you can read your seed-file as an additional source dataset and write its content into the destination dgn-file.

Badge

Hi @lenaatsafe In the past I have been able to use a Seed file in terms of setting the, lineweights, colors etc to show up as per the settings in the Seed file. However this does not always work and I was wondering if there is some other setting I need to configure to ensure this always works. Reading through the answers on this forum question I am still a bit confused as to the difference between igds_level and igds_level_name and was wondering if this has an impact on whether the Seed file works. I did notice that in your example you set igds_level to 'Level 26A' however igds_level appears to be of integer type which has confused me.

Also, even when I do get the colors, lineweights, etc to work from the Seed file, I am unable to get any of the content within the Seed file such as the Title block , to appear in the output DGN. Is there a way to ensure this content comes through?

Thanks

Would you have a workspace started with some source data sample and maybe a list of requirements (if they are not obvious)? If you share the workspace, source data sample, and requirements together with the seed-file you are going to use, I will be happy to help you fine tune the workspace.

Badge +1

Hi @aquamarine

are you dealing with DGN v7 or DGN v8? As far as I recall, in v8, igds_level as actually level name rather than level number. It is quite not easy to get to level numbers in v8 (in MicroStation). Level numbers seem to be an obsolete concept now. In v7, igds_level is level number while igds_level_name is level name.

If you set fanout on the destination feature type, you can use igds_level for v8 or igds_level_name for v7 as the fanout attribute. The key is to have the correct values in these attributes on the features.

If you do work with v7 seed-file, let's take a look and compare. Is your desired output in v7?

Re the content of the seed file: only the file header is copied, i.e. other elements are not supposed to be transferred into the new file. If you need e.g. seed-file Title Block, you can read your seed-file as an additional source dataset and write its content into the destination dgn-file.

Hi @lenaatsafe thank you for your reply. I am using DGN v8. Thanks for clearing up the igds_level / igds_level_name confusion for me! It is making more sense now.

Re the seed file, I will try your method of reading it in as an additional source dataset. Thanks!

Badge +1

Would you have a workspace started with some source data sample and maybe a list of requirements (if they are not obvious)? If you share the workspace, source data sample, and requirements together with the seed-file you are going to use, I will be happy to help you fine tune the workspace.

My workspace is now working for me. The only outstanding issue I had was the seed file content not coming through, but I know what to do now based on your above comment. Thanks for all your help with this!

Reply