Clear Display States Example (VB.NET)
This example shows how to clear the display states from a part.
'----------------------------------------------------------------------------
' Preconditions: Open a part document.
'
' Postconditions:
' 1. All appearances are removed from all configurations of the part.
' 2. The display states are un-linked from configurations.
' 3. All features of the part are now visible.
'
---------------------------------------------------------------------------
Imports
SolidWorks.Interop.sldworks
Imports
SolidWorks.Interop.swconst
Imports
System.Runtime.InteropServices
Imports
System
Partial
Class
SolidWorksMacro
Dim
modelDoc As
ModelDoc2
Dim
partDoc As
PartDoc
Dim
boolstatus As
Boolean
Sub
main()
modelDoc = swApp.ActiveDoc
partDoc = modelDoc
boolstatus = partDoc.RemoveAllDisplayStates
End
Sub
Public
swApp As
SldWorks
End
Class