Zenkai
Mechanical
- May 12, 2006
- 3
Hi, I need a code that prints a drawing file as a PDF, I need something that alowes me to edit the location and name of the PDF save that it is printing.
I dont want to use SaveAS pdf option because some anotations such as weldments come out wrong, and if you use certan fonts then the users on other machines need those fonts to view the text.
I am running Solidworks 2006 3.1
If i try recording a macro
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
swApp.ActiveDoc.ActiveView.FrameState = 1
Part.PrintDirect
End Sub
The part.printdirect just promts me, and it prompts me for the last saved printer, so if it wasnt PDF it just prints to another printer. Again I would like to manipulate this to print specifially to a PDF and to say which dir and file name to save it as.
I don't want any reference to third party programs either please, I am building a custom macro and this will intergrate into what I am doing.
Thank you!
I dont want to use SaveAS pdf option because some anotations such as weldments come out wrong, and if you use certan fonts then the users on other machines need those fonts to view the text.
I am running Solidworks 2006 3.1
If i try recording a macro
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
swApp.ActiveDoc.ActiveView.FrameState = 1
Part.PrintDirect
End Sub
The part.printdirect just promts me, and it prompts me for the last saved printer, so if it wasnt PDF it just prints to another printer. Again I would like to manipulate this to print specifially to a PDF and to say which dir and file name to save it as.
I don't want any reference to third party programs either please, I am building a custom macro and this will intergrate into what I am doing.
Thank you!