Skip to main content
Question

Convert SHP to DWG/DXF

  • October 15, 2019
  • 3 replies
  • 318 views

Forum|alt.badge.img

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

sipsysigh
Contributor
Forum|alt.badge.img+7
  • Contributor
  • October 15, 2019

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


Forum|alt.badge.img
  • Author
  • October 15, 2019
sipsysigh wrote:

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?

 


sipsysigh
Contributor
Forum|alt.badge.img+7
  • Contributor
  • October 15, 2019
joe_gerner wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings