Page 1 of 1
How to exclude hidden layers when exporting PDF from DWG
Posted: 17 May 2023, 10:43
by dancefly09
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
Posted: 23 May 2023, 11:00
by support
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