Skip to main content

I'm reading a shapefile and want to save it as DWG. All the features are closed polylines, so I'd like to fill them with FME in the same way as "adefillpolyg" does in ACAD. When I use the FeatureColorSetter transformer, I can view the filled polygons in the inspector, but when I save them as DWG, only the outline color is saved. When I use the DWGStyler, I can only change the outlines, which I guess is because there is no DWG-conform "fill" yet. Is it possible to create fills or does this only work on pre-filled polylines?

Hi,

The dwg styler has a specific section for areas where you can set the area entity type (polygon) and fill pattern name (hatch) which should result in a filled polygon.

Hope this helps


If the shape file is a linear one and not an area shape file, then you'll get what you're looking here. If the features think they are lines, we will not fill them in when we write to autocad, even if they begin and end at the same point. Without having your data and double checking, I can't be sure, but I'd wager you should run through the GeometryCoercer to ask it to make an fme_polygon -- it will not change the actual coordinates, but then we really will be thinking we have an area to be filled. I'd do that before the DWGStyler.


I have found when dealing with DWG data (which I work a lot with) if I want a polygon with fill I treat them as two separate entities

I split the data through two DWG stylers

1st DWG styler - Set the area entity under Area to polygon

2nd DWG styler - Set the area entity to Hatch with fill pattern and set the fill pattern to solid

I bring the data back together with an attribute manager

I am not sure if it is the best method but for me it works a treat


I ended up converting them to polygons in ArcMap but the suggestions here worked as well — thanks!


Reply