Automated solidworks blueprint printing with layer selection

Hello

I would like to do an automated printing of SolidWorks drawings with a macro.

I already have a macro set up on a SolidWorks button that generates a PDF for me and renames it with the revision via the file's properties.

I would like to duplicate it, to generate the pdfs for 2 different applications, and in the variant I would like to control the printing of the layers.

In the idea I keep my macro to generate the complete pdfs, and I make a 2nd one to generate the pdfs but removing some layers (either we hide them, or we don't print them...), there on the other hand I don't know if it's possible to do, and at least I don't know how.

FYI I currently have my files in a SolidWorks PDM.

Thank you in advance.

1 Like

Regarde la fonction Getlayer:
https://help.solidworks.com/2023/english/api/sldworksapi/Determine_if_Layer_is_Visible_Example_VB.htm
Ici un autre exemple:

Ou encore:

4 Likes

thanks for the links, I'll look into it