Solved

Shapefile to dwg becoming a block and losing attribute data

  • 27 July 2017
  • 5 replies
  • 47 views

Badge

Folks, I know I am missing something simple here.

What I am trying to do is convert polygons from a shapefile to a dwg while conserving the attribution.

The shapefiles are polygons and may or may not have multiparts and donut geometries. As such it seems a mpolygon is the best fit as an AutoCAD datatype.

Something similar has been asked Here: Shape to AutoCAD with attributes by @lmerino but no answer I can get to work.

I have the cad writer set to extend entity data

However when I look at the output in CAD the polygons are coming through as blocks. @Mark2AtSafe suggested using a Deaggregator transformer but I am not sure how this will help.

I have done as @erik_jan suggested and added autocad_entity set to autocad_mpolygon via a AttributeManager and everything in the target drawing will then end up as a mpolygon as desired. However there is no attribution.

Sample data:

Edit: Seems that using a different writer such as Autodesk AutoCAD Map 3D Object Data ends up with the desired output as suggested by here by @itay but the question remains as to why it is not working for the RealDWG or DWG/DXF writers.

icon

Best answer by fmelizard 29 July 2017, 00:16

View original

5 replies

Userlevel 4
Badge +30

Hi @elpone,

Dou you want to convert Shape to Real DWG or to AutoCAD Map 3D Object?

Thanks

Userlevel 4
Badge +13

Hi @elpone

 

It is my understanding that the base AutoCAD product doesn't support typical attribution (or object data). AutoCAD Blocks on the other hand do support attribution. With AutoCAD Map 3D and other recent Autodesk products such as Civil 3D we have seen the introduction of Object Data. These data are much more in line with what you'd expect from a GIS and explain why we see the User Attributes with the Map 3D Writer.

 

 

If you are selecting Extended Entity Data for the output attributes FME will store these as extended data in the file. If you are using AutoCAD 2015 and above you should be able to see these extended data with the Command XDLIST in Autocad. FME should also pick up the extended data too when reading the file back in.

 

 

With respect to the Automatic Block creation with some of your polygons are actually Multi-Polygons which FME treats as and aggregate. The RealDWG writer and ACAD writer will attempt to keep these features together by grouping them as a Block. Converting the features to MPolygons is a solution for this as you've found out already. A good tool for this is also the DWGStyler which lets you pick color and fill patterns.
Badge

Hi @elpone,

Dou you want to convert Shape to Real DWG or to AutoCAD Map 3D Object?

Thanks

My aim was to use the Real DWG or DWG/DXF writer as the end use case is for use in CAD drawings and I necessary don't know what level licence the end user will have. From what I understand AutoCAD will not 'see' the object data.

 

 

Userlevel 4
Badge +30
My aim was to use the Real DWG or DWG/DXF writer as the end use case is for use in CAD drawings and I necessary don't know what level licence the end user will have. From what I understand AutoCAD will not 'see' the object data.

 

 

From license FME Professional you can work with AutoCad

 

License Level FME

 

Badge
This is how the workspace has ended up in the end. But by de-aggregating and writing to autocad_mpolygon as the autocad entity.

 

Thanks for the help and suggestions.

Reply