Skip to main content
Solved

Set dynamic AutoCAD Layer coloring to DWG Writer

  • January 28, 2020
  • 4 replies
  • 136 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.

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

4 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • 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
  • January 28, 2020
erik_jan wrote:

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+18
  • Contributor
  • 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
  • January 28, 2020
erik_jan wrote:

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 :)


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