Save Drawing as PDF Macro and rev update
Save Drawing as PDF Macro and rev update
(OP)
Hi All
I was trying to write a macro that I can save my drawing after every revision update as a pdf file, adding the rev(num) to the file name . After recording, I needed to know, how to grab that revision name that I update manually, to the file name I wanna save. Actually if possible, I wanted to do this without running a macro, but each time I would update the revision number, this could be done automatically. Is it possible ?
Any solution is appreciated
Sub main()
Set swApp = _
Application.SldWorks
Set Part = swApp.ActiveDoc
Part.ClearSelection2 True
longstatus = Part.SaveAs3("Z:\CAS1259F5\1259F5-P02-REV0.PDF", 0, 0)
End Sub
I was trying to write a macro that I can save my drawing after every revision update as a pdf file, adding the rev(num) to the file name . After recording, I needed to know, how to grab that revision name that I update manually, to the file name I wanna save. Actually if possible, I wanted to do this without running a macro, but each time I would update the revision number, this could be done automatically. Is it possible ?
Any solution is appreciated
Sub main()
Set swApp = _
Application.SldWorks
Set Part = swApp.ActiveDoc
Part.ClearSelection2 True
longstatus = Part.SaveAs3("Z:\CAS1259F5\1259F5-P02-REV0.PDF", 0, 0)
End Sub






RE: Save Drawing as PDF Macro and rev update
Chris, CSWP
SolidWorks '16
ctophers home
SolidWorks Legion
RE: Save Drawing as PDF Macro and rev update
SW Professional 2015 SP 5.0
SW Electrical 2D/3D SP 5.0
64 bit
Intel Xeon X(R) CPU 3600 @ 2.80 GHz
8.0 GB of RAM
NVIDIA Quadro 2000
RE: Save Drawing as PDF Macro and rev update
It is possible to develop what you are looking for but this needs to be developed as an integrated add-in which listens for property change events and exports the PDF if revision is changed. If you are developer I can give you some hints of API methods to use otherwise you might need to get this through the paid consultancy.
If exporting all drawings in a batch mode is an option for you you may take a look at this tool: https://www.youtube.com/watch?v=vXfXnoRT_zs which can export PDFs in a batch mode allowing custom naming.
Thanks,
Artem
RE: Save Drawing as PDF Macro and rev update
yes I am the developer, yes the revision comes from the custom property. the table in the drawing section. and I think that at the moment the work is only to develop this part. to automatically save the drawing as pdf by changing revision. I do appreciate your points.
Regards