Skip to main content
Solved

Shapefile to dwg becoming a block and losing attribute data


elpone
Contributor
Forum|alt.badge.img+3

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.

Best answer by fmelizard

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.
View original
Did this help you find an answer to your question?

5 replies

danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • July 28, 2017

Hi @elpone,

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

Thanks


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • Best Answer
  • July 28, 2017

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.

elpone
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • July 31, 2017
danilo_fme wrote:

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.

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • August 1, 2017
elpone wrote:
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

 


elpone
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • August 2, 2017
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


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