Skip to main content

Hi there,

New to FME! I would like to automate a simple FME task; convert .dwg to .shp. How can I go about doing this simple command for hundreds of .dwg files? Also, how can I make the output .shp to have as a suffix the original .dwg filename? e.g. 1234.dwg to (1234_line.shp, 1234_polyline.shp, 1234_polygon.shp and etc....)

Hi @hugocrites

 

 

If the DWG files are within a single directory, when adding your reader you can select 'select multiple files' from the drop-down to the right of the 'dataset' parameter. Here you can select a folder rather than a file, and FME will add a feature type for each file within the folder.

 

 

If you need multiple SHP outputs, simply map these to equivalent SHP writers and the filename will remain the same.

 

 

If you need to merge them into a single output SHP, then you can use an AttributeExposer to expose the 'fme_basename' attribute, which is the filename of the input feature type. You can then use this in the writer output.

 

 

Cheers

 


Hi @hugocrites

 

 

If the DWG files are within a single directory, when adding your reader you can select 'select multiple files' from the drop-down to the right of the 'dataset' parameter. Here you can select a folder rather than a file, and FME will add a feature type for each file within the folder.

 

 

If you need multiple SHP outputs, simply map these to equivalent SHP writers and the filename will remain the same.

 

 

If you need to merge them into a single output SHP, then you can use an AttributeExposer to expose the 'fme_basename' attribute, which is the filename of the input feature type. You can then use this in the writer output.

 

 

Cheers

 

@rileym Thanks for this! it worked