×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Save Drawing as PDF Macro and rev update

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

RE: Save Drawing as PDF Macro and rev update

I do "File, Save as PDF", type in Rev after file name.

Chris, CSWP
SolidWorks '16
ctophers home
SolidWorks Legion

RE: Save Drawing as PDF Macro and rev update

If money's no object the Enterprise PDM program can be set up to do just what you want...

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

Is this revision come from custom property?

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

(OP)
Thank you Artem

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources