Question

Convert SHP to DWG/DXF

  • 15 October 2019
  • 3 replies
  • 122 views

Badge

Hi,

I want to transfrom shapefiles into dwg-files. Therefore I tryed this tutorial:

https://knowledge.safe.com/articles/18703/how-to-convert-shp-to-dwg-esri-shapefile-to-autoca.html

But I have a problem. If I want to transform polygon shapefiles, I always get more objects in the dwg file, then the original dataset had. In the video tutorial is the same problem. The original shape has 18 objects and after the transformation the dwg file has 21 objects. How could this happen?


3 replies

Badge

Hi @joe_gerner,

It looks like the Shapefile contains some multipart geometries (1 table record having more than 1 geometry parts associated to it). See the selected table record and associated geometries in screenshot below:

When this feature is written to DWG, it gets output as three features instead of one.

Hope this helps,

Simon

Badge

Hi @joe_gerner,

It looks like the Shapefile contains some multipart geometries (1 table record having more than 1 geometry parts associated to it). See the selected table record and associated geometries in screenshot below:

When this feature is written to DWG, it gets output as three features instead of one.

Hope this helps,

Simon

Hi, thanks for your answer. Can I change this in the transformation?

 

Badge

Hi, thanks for your answer. Can I change this in the transformation?

 

Hi @joe_garner,

If you want to retain the multipart polygon geometries in the output DWG file then you can use an AttributeCreator / AttributeManager to set the autocad_entity to autocad_mpolygon. An Mpolygon is essentially the AutoCAD equivalent of a multipart polygon. Some documentation from Safe on Mpolygons can be found here:

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/acad/MPolygons.htm

A screenshot of the AttributeManager parameters can be seen below:

Based on the example input Shapefile (ForwardSortationAreas.shp), setting the autocad_entity to autocad_mpolygon using the AttributeCreator / AttributeManager will result in 18 features being written to the DWG file, matching that of the input dataset.

Thanks,

Simon

Reply