You are on page 1of 1

Sub PerformanceBoost(swModel As sldworks.

ModelDoc2, _
Optional ByVal CommandInProgress As Boolean = False,
Optional ByVal EnableGraphicsUpdate As Boolean = True,
Optional ByVal EnableFeatureTree As Boolean = True
)

Try
SwApp.CommandInProgress = CommandInProgress

SwApp.SetUserPreferenceToggle(swconst.swUserPreferenceToggle_e.swFeatureManagerDyna
micHighlight, EnableFeatureTree)

Dim swModelView As sldworks.ModelView = swModel.GetFirstModelView


While Not swModelView Is Nothing
swModelView.EnableGraphicsUpdate = EnableGraphicsUpdate
swModelView.UpdateAllGraphicsLayers = EnableGraphicsUpdate
swModelView = swModelView.GetNext
End While

swModel.FeatureManager.EnableFeatureTree = EnableFeatureTree

swModel.FeatureManager.EnableFeatureTreeWindow = EnableFeatureTree
If EnableFeatureTree Then
swModel.FeatureManager.UpdateFeatureTree()
If EnableGraphicsUpdate Then swModel.GraphicsRedraw2()
Catch ex As Exception

End Try

End Sub

You might also like