Hi Everyone.
I need to generate pdf from lots of drawing but i want only first sheet to be export in pdf?
Solidworks Task Scheduler doesn't have option select sheet no. to convert.
If anyone has any macro to do it?
Thanks in adavance,
Priyank
Hi Everyone.
I need to generate pdf from lots of drawing but i want only first sheet to be export in pdf?
Solidworks Task Scheduler doesn't have option select sheet no. to convert.
If anyone has any macro to do it?
Thanks in adavance,
Priyank
Can you give it a shot. Please try on sample files first.
This has been tested on SW2014 SP3 Win 7 x64. So in case you've lower version of SW, you may need to fix the reference libraries in the macro.
Big thanks Deepak..it works grt ...working on sw14 SP2...You have save my lots of time
just need to change name of pdf to remove xxx_sheet1...
thanks again
Hi Deepak,
Great macro stands the test of time! Tested it with SW2020 and still works like a charm!
Just wondering how the following can be achieved:
1. To have the PDFs in black and white
2. To do the same for multi-page drawings that contain a sheet named DXF and save that sheet out as DXF
Thanks in advance!
Hung Siang Lim wrote:
Hi Deepak,
Great macro stands the test of time! Tested it with SW2020 and still works like a charm!
Hi Lim, great to hear that macro works great.
1. To have the PDFs in black and white
Put following line before the save as command
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swPDFExportInColor, False
2. To do the same for multi-page drawings that contain a sheet named DXF and save that sheet out as DXF
Check the macro codes by Ivana in this post Save only certain sheets as a PDF via a Macro and replace PDF extension by DXF. And replace following line
If Not UCase(s) Like "*FLAT*" Then
by
If UCase(s) Like "*DXF*" Then
Hi Deepak,
Didn't quite get it to work - it says run-time error "91" and pressing "debug" brings up the line "Set swModelDocExt = swModel.Extension" highlighted in yellow.
If I name the sheets (there can only be two maximum) in the following way:
1. Sheet1 = PDF
2. Sheet2 = DXF
I would like to adapt your codes to achieve the following:
1. Check if there is a sheet called "DXF"
2. If yes, save PDF as PDF and FLAT as DXF
3. If no, save PDF as PDF
Appreciate if you could point me in the right direction.
Thanks!
Hung
Hi Deepak,
How would i go about editing this so that all sheets but the last one are exported to PDF?
Thanks,
Neil
Neil, kindly check the macro codes by Ivana in this post Save only certain sheets as a PDF via a Macro
Can you give it a shot. Please try on sample files first.
This has been tested on SW2014 SP3 Win 7 x64. So in case you've lower version of SW, you may need to fix the reference libraries in the macro.