Question

Convert several dxf files to seperate Shapefiles (contained within a ESRI Geodatabase) with specific name of dxf file

  • 31 March 2020
  • 3 replies
  • 45 views

Hi

 

New to FME so please be gentle...

 

 

I think the question lines out what i want to do but for clarity, I have several dxf files in a folder on my c-drive. These dxf files are a combination of point, lines and polygons with a known projection. I want to convert all these dxf files to an ESRI geodatabase (or separate shapefiles -whichever is easiest) with the name of the dxf file naming the "shapefile".

Additional - if possible I would also like to reproject the shapefiles to another projection - but not that important now.

 


3 replies

Badge +8

Hi @lodewykjansen, this should do the trick:

  1. Start FME Workbench,
  2. From start page select Generate.
  3. For Dataset under "Reader", select the dxf file you want to process
  4. For Format under "Writer", type "shp" --> ESRI Shapefile
  5. For Dataset under "Writer", select the desired output folder
  6. Check the Dynamic radio button at the bottom
  7. Press OK

Start the workspace (F5), and check your results.

If you like, you can add a Reproject transformer in between the two brown blocks (Reader/Writer Feature types).

Thank you everything worked but....

The issue I discovered is that the different elevation contours are all merged into one geometry shapefile. Is it possible to take the name from the dxf file and apply it as the shapefile name?

 

Badge +8

Thank you everything worked but....

The issue I discovered is that the different elevation contours are all merged into one geometry shapefile. Is it possible to take the name from the dxf file and apply it as the shapefile name?

 

You could expose (check the box in front of) the fme_basename attribute and use it in the writer feature type as the name of the shapefile to create. However, the dynamic setup should do that already for you.

Reply