Skip to main content
Solved

Change the layers of a Dwg file on FME 2018


Hello,

 

I have a dwg file in Reader with existing layers.

 

I would like to know if you know how to match the Dwg file in Writer again. I use ShemaMapper this to have worked, however in output Writer I always have the same layers.

 

Please help me if you know a solution.

Best answer by andreaatsafe

Hi @lucas,

Are you able to re-upload your workspace? It looks like there was an issue with uploading the workspace.

So I'm not quite sure what attributes you are using for the SchemaMapper to define what attribute holds the layer name. I suspect there might be an issue with autocad_layer not being updated, or you have the autocad_layer attribute lingering from the original source data.

If you are not using autocad_layer anywhere, then I would recommend removing this attribute prior to writing it out.

- Andrea

View original
Did this help you find an answer to your question?

4 replies

andreaatsafe
Safer
Forum|alt.badge.img+10
  • Safer
  • Best Answer
  • April 17, 2020

Hi @lucas,

Are you able to re-upload your workspace? It looks like there was an issue with uploading the workspace.

So I'm not quite sure what attributes you are using for the SchemaMapper to define what attribute holds the layer name. I suspect there might be an issue with autocad_layer not being updated, or you have the autocad_layer attribute lingering from the original source data.

If you are not using autocad_layer anywhere, then I would recommend removing this attribute prior to writing it out.

- Andrea


  • Author
  • April 18, 2020
andreaatsafe wrote:

Hi @lucas,

Are you able to re-upload your workspace? It looks like there was an issue with uploading the workspace.

So I'm not quite sure what attributes you are using for the SchemaMapper to define what attribute holds the layer name. I suspect there might be an issue with autocad_layer not being updated, or you have the autocad_layer attribute lingering from the original source data.

If you are not using autocad_layer anywhere, then I would recommend removing this attribute prior to writing it out.

- Andrea

Thank you for responding Andrea!

 

I give it to you normally there should be no problem:

FME_Transformation_ancienne_version_sauvegarde.fmwt

 

I am new to FME, I use Map Feature Types for the SchemaMapper and I then entered a correspondence CSV file ( Test_SchemaMapper.csv ), which is going to have worked because in the rest of my FME Workbench recognizes the names of the new layers. However in my Dwg file in the output Writer. I get a Dwg file when I open with Autocad with the names of the old layers instead of the new ones.

 

Maybe there is a setting to allow layer name changes to be applied to the output writer file?

 

Thanks in advance Andrea

 


andreaatsafe
Safer
Forum|alt.badge.img+10
lucas wrote:

Thank you for responding Andrea!

 

I give it to you normally there should be no problem:

FME_Transformation_ancienne_version_sauvegarde.fmwt

 

I am new to FME, I use Map Feature Types for the SchemaMapper and I then entered a correspondence CSV file ( Test_SchemaMapper.csv ), which is going to have worked because in the rest of my FME Workbench recognizes the names of the new layers. However in my Dwg file in the output Writer. I get a Dwg file when I open with Autocad with the names of the old layers instead of the new ones.

 

Maybe there is a setting to allow layer name changes to be applied to the output writer file?

 

Thanks in advance Andrea

 

Hi @lucas,

I was not able to reproduce the issue as the sample DWG file only contained one layer with data (EP_exist_mobilier).

I do believe this issue is a result of the incoming features having the format attribute "autocad_layer".

In your workflow before writing your data out, please expose the attribute "autocad_layer", and then subsequently remove this attribute. This will remove the pre-existing layer name that is coming from the reader. See the below screenshot for how you could set this up:

 

I would also recommend reviewing using a feature type fanout in your workflow, so that you do not need to have individual feature types per AutoCAD layer. Here is the documentation, and an article with an example.

- Andrea


  • Author
  • April 21, 2020
andreaatsafe wrote:

Hi @lucas,

I was not able to reproduce the issue as the sample DWG file only contained one layer with data (EP_exist_mobilier).

I do believe this issue is a result of the incoming features having the format attribute "autocad_layer".

In your workflow before writing your data out, please expose the attribute "autocad_layer", and then subsequently remove this attribute. This will remove the pre-existing layer name that is coming from the reader. See the below screenshot for how you could set this up:

 

I would also recommend reviewing using a feature type fanout in your workflow, so that you do not need to have individual feature types per AutoCAD layer. Here is the documentation, and an article with an example.

- Andrea

Thank you very much for the documentation and your help I will read this carefully. I have a second problem which is much more annoying see: https://knowledge.safe.com/questions/112350/line-entities-no-longer-appear-in-the-output-dwg-f.html

 

If you would be how to solve it I would be very happy!

 

thank you in advance

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