Hello,
In order to publish all the fab documents in a single click I want to generate a pdf, a step and an excel of the list of welded parts.
I managed to make the pdf and step macros (it's my first) but not the excel one
Does anyone have anything?
FYI my vba pdf to show the info retrieved and the name of output.
Thank you
Dim swApp As Object
Dim swModel As SldWorks.ModelDoc2
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim Part As Object
Dim boolstatus As Boolean
Dim sRevision As String
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swModelDocExt = swModel.Extension
FileName = swModel.GetPathName
FileName = Left(FileName, Len(FileName) - 7)
sRevision = swModel.CustomInfo2(" ", " Ind. ")
Set Part = swApp.ActiveDoc
PathName = UCase(Part.GetPathName)
Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
Part.ClearSelection2 True
longstatus = Part.SaveAs3(FileName & " _ " & sRevision & " .PDF ", 0, 0)
End Sub