rustynissan
New member
- Dec 2, 2008
- 24
So I am trying to cycle through each configuration of an assembly document and check whether there are any rebuild errors. I intentionally added a mate to one configuration that causes errors, but the ForceRebuild3 method does not appear to catch it. My code is attached below. Any suggestions?
SW2009 x64 SP4.1, Vista Business x64, Intel Core i7 920 @4.2GHz, Quadro FX580, 2x 147GB 15K-rpm SAS HDs (RAID 0), 6GB DDR3 1600MHz RAM
Code:
Sub main(myStr As String)
Dim SW_APP As SldWorks.SldWorks
Dim SW_DOC As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Debug.Print "**** START ****"
Debug.Print myStr
Set SW_APP = CreateObject("SldWorks.Application")
Set SW_DOC = SW_APP.ActiveDoc
SW_DOC.ShowConfiguration2 myStr
boolstatus = SW_DOC.ForceRebuild3(True)
Debug.Print "Succesful Rebuild?: " & boolstatus
Set SW_DOC = Nothing
Set SW_APP = Nothing
Debug.Print "***** END *****"
End Sub
SW2009 x64 SP4.1, Vista Business x64, Intel Core i7 920 @4.2GHz, Quadro FX580, 2x 147GB 15K-rpm SAS HDs (RAID 0), 6GB DDR3 1600MHz RAM