AnsweredAssumed Answered

How can I save custom properties (drawing) in a pdf-file with a macro?

Question asked by Thomas Schmidt on Aug 23, 2016
Latest reply on Oct 17, 2016 by Yong Ning

Hi,

 

I use the following macro to create a pdf file. I want to implement the custom properties from my drawing also into the pdf file.

Who can help me in adapting my macro?

 

Option Explicit

Dim swApp As Object

Dim Part As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

Dim Filename As String

 

Sub main()

 

Set swApp = _

Application.SldWorks

 

Set Part = swApp.ActiveDoc

Dim myModelView As Object

Set myModelView = Part.ActiveView

 

Dim oModelDoc As ModelDoc2

Set oModelDoc = Part

 

Filename = oModelDoc.GetCustomInfoValue("", "Filename")

 

longstatus = Part.SaveAs3("C:\Output\" & Filename & ".pdf", 0, 2)

End Sub

 

Many thanks for your help

Thomas

Outcomes