Question

How to import models from a dgn file as separate features into FME desktop?


Badge +13
  • Contributor
  • 58 replies

I have a dgn file that consist of many models ( it corresponds to a building and every floor has its own model) and I would like to import the models as seperate features in FME if that would be possible. When I try to import individual feature types in the dgn reader, instead of the models I get all the level names instead that are present in the models. So the feature types do not correspond to the model names, but to the level names. So for example I would like to get a seperate feature type of a model for floor 1 and of a model for floor 2. Does anyone know how that might be achieved in FMe desktop? afbeeldingafbeelding 


4 replies

Userlevel 6
Badge +32

Not an expert on dgn but from the documentation I think you can expose igds_model_name using the AttributeExposer. Then you can use an AttributeFilter to split by model name.

Badge +13

@nielsgerrits​ Thank you very much for the suggestion. I was very eager to apply what you suggested: an attributeExposer that exposes igds_model_name and an AttributeFilter afterwards. Unfortunately when I was running the workbench, I got the following error message: 

DESIGN READER: Failed to locate or read world file. Geometric attributes will not be transformed
Error running translation.

The dgn file is on a bigger side (300 mb to be precisely), so I suppose it might be due to the dgn file size?

I guess this is another problem that unfortunately occured. 

Userlevel 6
Badge +32

@nielsgerrits​ Thank you very much for the suggestion. I was very eager to apply what you suggested: an attributeExposer that exposes igds_model_name and an AttributeFilter afterwards. Unfortunately when I was running the workbench, I got the following error message: 

DESIGN READER: Failed to locate or read world file. Geometric attributes will not be transformed
Error running translation.

The dgn file is on a bigger side (300 mb to be precisely), so I suppose it might be due to the dgn file size?

I guess this is another problem that unfortunately occured. 

Again, no expert at .dgn. If I look in the reader parameters I see the parameter "Apply Worlf File (.wld)" which you can try to disable.

Badge +13

Again, no expert at .dgn. If I look in the reader parameters I see the parameter "Apply Worlf File (.wld)" which you can try to disable.

Thanks, I tried with a another dng file that is smaller and I disabled "apply world file" and it works. I now have another question that maybe you might know the answer to. With the attributefilter you need to fill in beforehand the values of the attribute (igds_model_name), however in my case I have a lot of model names thus filling the "possible attribute values"would be cumbersome work and my ideal would be to make the script applicable for different dgn that have different model names. So writing the model names would be futile.

 

One solution , I was thinking about was writing the output of the uniquevaluelogger for the igds_model_names of one dgn file to a csv file and importing that into the attributefilter. However ideally I would like to import different dgn and thus I would need different csv files. I think, since I want to do a batch with many dgn in the future inthe script, thus I would like to filter without predetermining what the values of the attributes should be. Do you might know another alternative next to AttributeFilter that doesn't need the values to be predetermined and on the fly group elements together that have the same value for an attribute?

Reply