Skip to main content

Hello,

 

I'm trying to create a few workspaces where I'm converting DWG and DGN to GDB.

 

I've got my workspace up to:

  • Pull blocks with attributes through
  • Area Builder to convert lines to polygons
  • Joins metadata from block attributes to features
  • Geometry Validator to remove anything not required
  • Projection (raw data is in Snakegrid and I convert it to OSGB
  • Get Style Information:
    • Gets line styles using String Padder
    • Create Fill Style
    • Removes CAD Style Attributes
  • The Theme attrributes
    • String Searcher
    • List Indexer
    • Attribute Creator to get single word level description for theme
  • Finally I have tried these three transformers with no luck to convert the name of the Autocad_layer to Featureclassname using a lookup spreadsheet. This lookup has been simplified even by using just the example DWG as an exact translation, so it should be able to understand the lookup and convert the Autocad Layer name to the feature class name but it will not bring this through no matter what I try. The lookup has even been simplified so much so that it's just two columns. One for the lookup and one for the new feature class name, yet it always comes out blank. I've tried:
    • Schema Mapper (on all options)
    • Feature Merger
  • Directly after this I have a Attribute Exposer with just the columns I'd like to write, this also doesn't seem to work.

The data is confidential so I can't upload it to here but maybe someone can still help me.

Hi @kimburrows1242

There might be a confusion between the "fme_feature_type" attribute and the "autocad_layer"/"autocad_layer_name?" attribute with one overriding the other.

 

Right after the Schemamapper:

1. Does the features have a _schemamapper_rowid related to a line in the excel-file?

2. What is the value of fme_feature_type and autocad_layer? Is it changed?

 


Hi @kimburrows1242

There might be a confusion between the "fme_feature_type" attribute and the "autocad_layer"/"autocad_layer_name?" attribute with one overriding the other.

 

Right after the Schemamapper:

1. Does the features have a _schemamapper_rowid related to a line in the excel-file?

2. What is the value of fme_feature_type and autocad_layer? Is it changed?

 

Yes, it does bring up this column _schemamapper_rowid and it has values in it (a line of numbers from 1,2,3 etc..)

fme_feature_type and autocad_layer seem to be exactly the same

My lookup needs to take the autocad_layer and look up the new feature class name (which it will be called in the GDB once written out).

 

I've manged to get some screenshots for you, have a look and let me know where you think I'm going wrong.

1st - Schema Mapper settings (I have tried different ones in here too)

2nd - part of the lookup table

3rd - Attribute Exposer Settings

4th - Schemer Mapper Row IDs

5th - Part of the output attributes from the last Schema Mapper run

 

.

 


Hi @kimburrows1242

There might be a confusion between the "fme_feature_type" attribute and the "autocad_layer"/"autocad_layer_name?" attribute with one overriding the other.

 

Right after the Schemamapper:

1. Does the features have a _schemamapper_rowid related to a line in the excel-file?

2. What is the value of fme_feature_type and autocad_layer? Is it changed?

 

I just tried a

Map Feature Types with Autocad_layer -> FeatureClassName

It hasn't done them all but it's definitely just worked, however it's exported the FeatureClassName under the title fme_feature_type. It's not done them all but it's done a significant amount. The _schemamapper_rowid has changed to, it only has a few values in there now.

It all seems like it's almost correct.


Another good option would be to use the DatabaseJoiner transformer to join the information of the spreadsheet to the DGN/DWG file.

Using the autocad_layer/igds_level_name is tricky in case of an exploded block/cell. There can be a mismatch between the layer the block is on and the layers that contain the block elements (same for cells in the DGN file).

I would recommend using the fme_feature_type of the DWG/DGN source as that contains the layer/level of the block/cell.

Hope this helps.


Another good option would be to use the DatabaseJoiner transformer to join the information of the spreadsheet to the DGN/DWG file.

Using the autocad_layer/igds_level_name is tricky in case of an exploded block/cell. There can be a mismatch between the layer the block is on and the layers that contain the block elements (same for cells in the DGN file).

I would recommend using the fme_feature_type of the DWG/DGN source as that contains the layer/level of the block/cell.

Hope this helps.

This worked, however I couldn't expose the fme_feature_class int he DWG reader, I exposed the fme_feature_type, and this seemed to work for nearly everything. I'll keep testing and see. Thank you.


This worked, however I couldn't expose the fme_feature_class int he DWG reader, I exposed the fme_feature_type, and this seemed to work for nearly everything. I'll keep testing and see. Thank you.

Sorry, typo. Should have been fme_feature_type. I changed it in the answer.


Sorry, typo. Should have been fme_feature_type. I changed it in the answer.

This does work for the majority but I am still getting errors, even though I've take the ones that did not merge and added them into the lookup with a FC name. It's still treating them as errors. Any idea why?


This still doesn't work, even though I'd created a lookup with an exact replica of layer names. Can anyone shed any light?


Another good option would be to use the DatabaseJoiner transformer to join the information of the spreadsheet to the DGN/DWG file.

Using the autocad_layer/igds_level_name is tricky in case of an exploded block/cell. There can be a mismatch between the layer the block is on and the layers that contain the block elements (same for cells in the DGN file).

I would recommend using the fme_feature_type of the DWG/DGN source as that contains the layer/level of the block/cell.

Hope this helps.

This still doesn't work, even though I'd created a lookup with an exact replica of layer names. Can anyone shed any light?


Hi @kimburrows1242

There might be a confusion between the "fme_feature_type" attribute and the "autocad_layer"/"autocad_layer_name?" attribute with one overriding the other.

 

Right after the Schemamapper:

1. Does the features have a _schemamapper_rowid related to a line in the excel-file?

2. What is the value of fme_feature_type and autocad_layer? Is it changed?

 

This still doesn't work, even though I'd created a lookup with an exact replica of layer names. Can anyone shed any light?


Reply