Use Directory and File Pathnames Reader witth the Path Filter Parameter set to .dwg followed by FeatureReader with Format set to DWG, Dataset set to path_windows attribute (or unix) and Accumulation Mode set to Merge Initiator and Result to keep the path_rootname attribute so you can use it in the GDB writer.
Use a geometry filter to separate the feature flow into point (and text), polygon, polyline.
Insert your GDB writer (or use a FeatureWriter) in witch you set Feature Class or Table Name in the text editor to @Value(path_rootname)_points. Duplicate it and set to @Value(path_rootname)_polylines and polygons (or variations of them).
GDB is sensitive to geometry type per table.
Use Directory and File Pathnames Reader witth the Path Filter Parameter set to .dwg followed by FeatureReader with Format set to DWG, Dataset set to path_windows attribute (or unix) and Accumulation Mode set to Merge Initiator and Result to keep the path_rootname attribute so you can use it in the GDB writer.
Use a geometry filter to separate the feature flow into point (and text), polygon, polyline.
Insert your GDB writer (or use a FeatureWriter) in witch you set Feature Class or Table Name in the text editor to @Value(path_rootname)_points. Duplicate it and set to @Value(path_rootname)_polylines and polygons (or variations of them).
GDB is sensitive to geometry type per table.
Thank you, this works great. However with this method the CAD attributes are lost, I'd like to retain autocad_layer for example. Is there a way to do this?
@propertiesc The pattern you have in your workspace should work. fme_basename should return the DWG file name without the .dwg, so you shouldn't need the FilenamePartExtractor .
To read multiple dwg files, use the Multiple Folder/File browser;
@propertiesc The pattern you have in your workspace should work. fme_basename should return the DWG file name without the .dwg, so you shouldn't need the FilenamePartExtractor .
To read multiple dwg files, use the Multiple Folder/File browser;
Hi Mark, fme_basename shows up with null values for the dwgs, I think this is a known bug, see here - https://community.safe.com/s/question/0D54Q000080hfGV/dwg-and-dgn-reader-not-exposing-fmebasename-and-published-parameter
Hence me looking for a workaround.
Hi Mark, fme_basename shows up with null values for the dwgs, I think this is a known bug, see here - https://community.safe.com/s/question/0D54Q000080hfGV/dwg-and-dgn-reader-not-exposing-fmebasename-and-published-parameter
Hence me looking for a workaround.
@propertiesc This should be fixed in FMe 2020.0 and later