Skip to main content
Open

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

Related products:FME Form

gabriel_hirsch
Contributor

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.

This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

14 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • October 12, 2017

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.


gabriel_hirsch
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • October 16, 2017

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.


fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • August 9, 2018

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.


nielsgerrits
VIP
Forum|alt.badge.img+54

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

gabriel_hirsch
Contributor
Forum|alt.badge.img+11

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


nielsgerrits
VIP
Forum|alt.badge.img+54

@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...


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • July 3, 2020

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


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • July 3, 2020

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

'

 


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • July 2, 2021

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

 

 


lazarlubomir
Contributor
Forum|alt.badge.img+7
  • Contributor
  • April 14, 2022

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

anne_kathr1ne
Contributor
Forum|alt.badge.img

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.


gabriel_hirsch
Contributor
Forum|alt.badge.img+11

With the introduction of FME 2024.0 some of these settings has been possible to populate with attributes. That is Color, Linetype, Lineweight and Transparency. Which are all located under Layer → Appearance in the Writer Feature Type dialog.

But we still need the possibility to at least also set the Layer Description information from an attribute.

 


jkr_wrk
Influencer
Forum|alt.badge.img+29
  • June 3, 2024

Does it work on first feature sets the layer attribute? Because every feature could be on the same layer and have a different color.

Or do we actualy want to have a AUTOCAD template writer? Where we can set the layers, colors, states and linetypes?

And then write the features to the classic writer?


LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • December 17, 2024
ReleasedOpen
 
Reopened to capture the addition of layer description information.

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