Skip to main content
Solved

Set dynamic AutoCAD Layer coloring to DWG Writer

  • January 28, 2020
  • 4 replies
  • 171 views

anamanvil
Forum|alt.badge.img
  • Hi all,

I am specifying the AutoCAD Layer color by a given attribute 'Category' which is being filtered using 'AttributeFilter' transformer and redirected to each DWG Writer to specify the AutoCAD Layer Name and color. All the below DWG Writers are a single DWG Output File.

 

For some reason, when no features are written to some of the above DWG Writer, I still have that AutoCAD Layer Name written as below, even though no features have been past through the attribute filter so I am not even sure why that Layer 1, Layer 100000, etc. is being set.

Any help would be highly appreciated.

 

Thanks,

Ana

Best answer by erik_jan

Looking at the DWG writer parameters here, you could set the parameter "Purge Unused Objects" to Yes to avoid writing empty layers.

Hope this helps.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • January 28, 2020

Are you using a DWG template file for the writer?

If that is the case those empty layers are part of the template and will be created in the output DWG.

Hope this helps finding the issue.


anamanvil
Forum|alt.badge.img
  • Author
  • 40 replies
  • January 28, 2020

Are you using a DWG template file for the writer?

If that is the case those empty layers are part of the template and will be created in the output DWG.

Hope this helps finding the issue.

No, I am not using a DWG template file but just setting the Default Color to an AutoCAD color code equivalent such as '250' in order to set a color for each 'Category' as my AutoCAD layers change every time the workspace is run and could not find a way to make Template File work for this case.


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • Best Answer
  • January 28, 2020

Looking at the DWG writer parameters here, you could set the parameter "Purge Unused Objects" to Yes to avoid writing empty layers.

Hope this helps.


anamanvil
Forum|alt.badge.img
  • Author
  • 40 replies
  • January 28, 2020

Looking at the DWG writer parameters here, you could set the parameter "Purge Unused Objects" to Yes to avoid writing empty layers.

Hope this helps.

This has solved the problem. Many thanks for your help Erik. It is really appreciated :)