Second slide
Generic placeholder image

Force rebuild and save. Simple but effective.

This simple but effective macro combines the ForceRebuild3 and Save SolidWorks funtions into one useful macro. It is useful if your drawing views disappear.

This macro will force a rebuild of all of the features in the drawing or model whether they need a rebuild and then save the document.

It is not the same as a normal rebuild which is Ctrl+B on the keyboard which is typically used after changing a model dimension. This is Ctrl+Q

I have replaced the standard save button on the menu bar with this macro. Give it a try

Please click on the panel below to reveal or hide the macro code

This procedure combines the funtions of ForceRebuild3 and Save. It forces a rebuild of all of the features in the drawing or model whether they need a rebuild. I found it especially useful if my views kept disappearing.
 'Make sure you have the correct SW Type library attached in the references
'e.g SldWorks 20xx Type Library
'On the menu bar go to Tools then References to locate the library

Sub ForceRebuildAndSave_Main()
    Dim swApp As SldWorks.SldWorks
    Dim swModelDoc As SldWorks.ModelDoc2
    'Connect to SW
    Set swApp = Application.SldWorks
    'Get active document
    Set swModelDoc = swApp.ActiveDoc
    With swModelDoc
        'Force rebuild
        .ForceRebuild3 True
        'Re-draw graphics window
        'Save active document
    End With
End Sub

Downloads Page

This site is now a responsive website. Please follow the link to find out more.

responsive web design

I would be grateful for any feedback regarding this site or comments regarding the macros that I have uploaded.

HTML Comment Box is loading comments...