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?
Use an AttributeExposer to get idgs_xref_file_name and idgs_xref_path attributes and send them to a FeatureReader where you set the Dataset parameter to a concatenation of the two atributes you exposed. That way you get your xref dgn's in your workspace.
Be sure to aggregate on those attributes before sending them to your FeatureReader or you will end up with a lot of redundant data in your workspace.
Use an AttributeExposer to get idgs_xref_file_name and idgs_xref_path attributes and send them to a FeatureReader where you set the Dataset parameter to a concatenation of the two atributes you exposed. That way you get your xref dgn's in your workspace.
Be sure to aggregate on those attributes before sending them to your FeatureReader or you will end up with a lot of redundant data in your workspace.
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)
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)
I switched the reader to V8 and made some small adjustments and now some of the dgn reader is exposing the full path to the reference files but not all. Thoughts?
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
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)
I think I see where you are going with this, thanks for explaining it. Below is my stab at this and I'm getting a translation error, so apologies but I'm almost there. I copied all reference files to the folder the FMW is in. Do I want to have a Reader to start that is pointed to the DGN file on the network that I want to convert? Then connect it to your FeatureReader using the syntax you provided? I still get prompted by the FeatureReader to provide a dataset so I guess I'm confused as to how the FeatureReader knows which DGN is the main DGN to use while using your method to change the xref file paths.
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)
For starters you are proceeding correctly. Your "to convert" dgn is read as is and it then initiates the FeatureReader.
You have to add a Tester in front of the FeatureReader with igds_xref_file_name Attribute Has A Value set to get only the features that point to xrefs. You also want to set Workspace Parameters->Translation->Rejected Feature Handling set to Continue Translation.
I would set the FeatureReader's Output to Single Output Port instead of One per Feature Type than add an AttributeExposer and expose igds_level, than use it in the FeatureWriter as Layer Name.
You also need to create a direct conections between the DGN you're trying to convert and the FeatureWriter. Don't forget to expose igds_level here to.
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)
Thanks, I think I have this wired up pretty much how you described, see below. In my Tester, I'm only seeing 2 xref values that pass (and I believe that was the issue originally but i could be wrong). The Generic port had over 2000 features so I assumed thats what i should use for the FeatureWriter but is that right? When I open the DWG, i notice it has over 500 kb in size but only appears to have this tiny text when i open and zoom extents. Thoughts? I feel like I'm so close..lol
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)
From what you previously explained 2 xrefs and a couple thousand features is about right.
But, from your original post, they seem to be far few. Maybe you are missing some xrefs.
Just inspect the feature reader and see if the read part is the same as the written part.