Add the possibility to use attributes in the DWG writer for Layer paramaters

Related products: FME Form

In the Autodesk AutoCAD DWG/DXF-writer (and in the other DWG writers too) it would be good if you could choose an attribute for Layer Description, Default Linetype, Default Color and the states: On, Frozen, Hidden, Locked, Plottable. It's not so usable right now when you need to hard code these values which makes all layers look the same.

I like this idea alot.


The way we could win here is via the FeatureWriter. Right now, if you use the FeatureWriter, you have an easy way to set all those values using published parameters. We'd just need to extend that to include taking the values from the FIRST feature that hits that layer. I'll ask the team how hard that would be to do.


The user case I have in mind is to have the possibility to create a DWG template file with input from an Excel spreadsheet or a Sharepoint list. Every row in the Excel spreadsheet (or Sharepoint list) correspond to a layer in the DWG file. The a non Autocad user could populate the list with layer name, description, color etc. and I can use it as input in FME to create the template file. Then there's only one feature per layer.


I like this idea really a lot and am very interested in the team reaction.

I just converted an old 'Smallworld to DWG/DXF workbench' with a few hundred output feature types (with different names, colors and linetypes) to a 'single line' workbench with 1 generic input and output feature type. I dynamically create tens upto hundreds of layers based on attribute values and Excel mappings. I get the appearance of the DWG 'OK' by setting the autocad_color, autocad_linetype and autocad_linetype_generation values for each individual feature to the desired value. But users of the resulting product get frustrated that the layers have no correct properties and no object is drawn 'by layer'.

Dale's solution of using attribute values from the first feature that hits the layer is exactly the solution I am looking for.


In case anyone is looking for a solution, I worked around this by dynamically creating a template using a WorkspaceRunner.

Essentially I use 3 template folders, a,b,c. An empty template in a, gets copied to b, child writes dwg to c, based on the template in b, using parameters for layername and layercolor, then copies the result back to b. The child iterates through all layers. The parent finally writes the data to output, using the generated template in b.

FME 2019 poc in attached zipfile.


 

dynamictemplate.zip

Any news on this old idea of mine? It's still needed.


@daleatsafe Any updates about this? I have some CAD engineers complaining about all the red layer colors and my desktop workaround does not work as nice in server...


A DWGTemplateCreator as a startpoint (similar to the Creator) would be great. Or just on the writer create the Template from the fme_color attributes directly - without the template @daleatsafe


Quite annoying with correct colors on the features but not on the layers

'

 


Removing some of the "snags" of working with reading and writing DWG-files could be a good project for future work.

  • Making writing more dynamic as mentioned here
  • Merging the different DWG-formats (RealDWG,DWG,3DDWG) into one more understandable front-end
  • Fixing other minor iches regarding reading and writing DWG
  • Blocks vs other
  • Easily create 3DSolids

 

 


Please, I can add also one parameter to include to future development of the DWGs readers/writers:

  • Freeze layer on Layout - its quite important parameter if you wanna create many layouts, but in each of that is little bit different layer composition

Hi,

 

I have created an attribute with color values and used them as input for the color setting, but can't seem to get it to work, only one color output. Am I missing something?

imageimage 

When I manually write a color-value as fixed value it works fine. So somehow it does not pick up my attribute values.