How to exclude hidden layers when exporting PDF from DWG
Moderators: SDS, support, admin
-
- Posts: 1
- Joined: 17 May 2023, 10:36
How to exclude hidden layers when exporting PDF from DWG
Some entities in the dwg file are scattered on different layers. I set one of the layers as a hidden attribute, and then exported this dwg file to PDF through cad.net. The generated PDF still presents the entities on the hidden layers. May I ask if there are any relevant options to control whether hidden layers are not exported when exporting PDF?
Re: How to exclude hidden layers when exporting PDF from DWG
Hello,
If a layer is frozen or invisible the CAD entities it contains will also be invisible. If a layer is invisible but not frozen and it contains inserts of blocks belonging to visible layers then those blocks will be visible.
Please use the code below:
if (cadImage != null)
{
foreach(CADLayer l in cadImage.Converter.Layers)
{
if (l.Name == "0") l.Visible = false;
}
}
Kind regards,
Suraya
If a layer is frozen or invisible the CAD entities it contains will also be invisible. If a layer is invisible but not frozen and it contains inserts of blocks belonging to visible layers then those blocks will be visible.
Please use the code below:
if (cadImage != null)
{
foreach(CADLayer l in cadImage.Converter.Layers)
{
if (l.Name == "0") l.Visible = false;
}
}
Kind regards,
Suraya
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support