Deletes all cosmetic threads, which do not have callouts, in a drawing of an assembly only.
.NET Syntax
Visual Basic (Declaration) | |
---|
Sub DeleteAllCosmeticThreads() |
Visual Basic (Usage) | |
---|
Dim instance As IDrawingDoc
instance.DeleteAllCosmeticThreads() |
C# | |
---|
void DeleteAllCosmeticThreads() |
C++/CLI | |
---|
void DeleteAllCosmeticThreads(); |
Example
VB.NET:
'---------------------------------------------------
'
' Preconditions: Drawing of an assembly with
' cosmetic threads is active.
'
' Postconditions: Cosmetic threads without callouts
' are deleted.
'
'---------------------------------------------------
Option
Explicit On
Imports SOLIDWORKS.Interop.sldworks
Imports
SOLIDWORKS.Interop.swconst
Imports
System
Partial
Class SOLIDWORKSMacro
Public Sub main()
Dim swDrawingDoc As DrawingDoc
Dim swModel As ModelDoc2
Dim boolstatus As Boolean
swDrawingDoc = swApp.ActiveDoc
swDrawingDoc.DeleteAllCosmeticThreads()
swModel = swDrawingDoc
boolstatus = swModel.ForceRebuild3(False)
End Sub
''' <summary>
''' The SldWorks swApp variable is pre-assigned for you.
''' </summary>
Public swApp As SldWorks
End
Class
Remarks
See Also
Availability
SOLIDWORKS 2009 SP2, Revision Number 17.2