forcibly rebuild

I need to acquire knowledge for the Rebuild

E.G.

'Forcibly Rebuild All Configurations Example (VB)

'This example shows how to forcibly rebuild all of the configurations in a SolidWorks document.

'--------------------------------------

Option Explicit

Sub main()

    Dim swApp                   As SldWorks.SldWorks

    Dim swModel                 As SldWorks.ModelDoc2

    Dim vConfNameArr            As Variant

    Dim sConfigName             As String

    Dim nStart                  As Single

    Dim i                       As Long

    Dim bShowConfig             As Boolean

    Dim bRebuild                As Boolean

    Dim bRet                    As Boolean

   

    Set swApp = CreateObject("SldWorks.Application")

    Set swModel = swApp.ActiveDoc

   

    Debug.Print "File = " + swModel.GetPathName

   

    vConfNameArr = swModel.GetConfigurationNames

    For i = 0 To UBound(vConfNameArr)

        sConfigName = vConfNameArr(i)

       

        bShowConfig = swModel.ShowConfiguration2(sConfigName)

       

        nStart = Timer

        bRebuild = swModel.ForceRebuild3(False)

       

        Debug.Print "  Config       = " & sConfigName

        Debug.Print "    ShowConfig = " & bShowConfig

        Debug.Print "    Rebuild    = " & bRebuild

        Debug.Print "    Time       = " & Timer - nStart & " s"

    Next i

End Sub

'--------------------------------------

Result

File = F:\BE(J)S\HG20592Pn10\法兰 WN10-1.0 RF.SldPrt

  Config       = 默认

    ShowConfig = False

    Rebuild    = True

    Time       = 4.425781 s

SolidworksApi macros