Greetings, I have a microstation DGN file that I'm trying to convert to a dwg or dxf and my output is missing all information from the reference files (see attached images). I tried fiddling with the reader to include reference files but it has not made a difference in my output yet. I even tried to include a DWGStyler that references a dwg template but still no change in the output. Thoughts?
How to convert DGN with reference files to DWG
Best answer by caracadrian
Thanks for that info. I checked on those two parameters in the reader and set a logger to display just those 2 values but they are blank. I did notice a message in my workspace that states it couldn't open the reference file, etc (see below). Thoughts on what i should check for as I'm not a dgn or cad guru by any means. its strange that i can open the DGN in bentley connect (although it does prompt me that it can only be opened read-only)
If you put your xref dgn files in the same folder as your workspace file (fmw) you could use the $(FME_MF_DIR) Parameter in a FeatureReader to read them from there, else point to the path you have them stored.
Here is an example of setting the FeatureReader. The @ReplaceString() is used to get rid of the leading REF so you get a valid windows_path.
My guess is that you have the refs in a REF folder with your original dgn. In that case, you could expose the fme_dataset attribute, extract the path of your file from there and create the value the FeatureReader should read
@Value(some_path)\@Value(igds_xref_file_name)
where "some_path" is the path of your original dgn file.
You can use the FileNamePartExtractor transformer for that
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.