Good morning,
I have an old program that was created by an old employee to pull BOMs from a SolidWork drawing file, and input it to an excel file on a specific line.
It does not work anymore; I receive an error "There is no BOM for this Drawing!"
Here is a snippet of some of the code:
Dim swView As SldWorks.View
‘Down further in the code’
'Get a reference to the SolidWorks view containing the BOM
'and get a reference to the BOM within that view
Set swView = swDrawingDoc.GetFirstView()
Do While BOMTable Is Nothing
Set swView = swView.GetNextView()
If swView Is Nothing Then
MsgBox "There is no BOM for this Drawing!", vbExclamation
GoTo ExitSub
End If
Set BOMTable = swView.GetBomTable()
Loop
What I am trying to figure out is, is Sldworks.view the same namespace from 2006 to 2011?
Sorry, my knowledge of VB is relatively limited; any help would be greatly appreciated.
SolidworksApi macros