RemoveAllLabels Example
Sub Example_RemoveAllLabels()
' This example removes all labels from a selected contour
On Error Resume Next
' Delete existing SelectionSet
ThisDrawing.SelectionSets("SSet").Delete
' Create the selection set based on a point selection
' and filter for Contour objects
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("SSet")
Dim mode As Integer
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
gpCode(0) = 0
dataValue(0) = "AECC_CONTOUR"
Dim groupCode As Variant
Dim dataCode As Variant
Dim returnPnt As Variant
groupCode = gpCode
dataCode = dataValue
returnPnt = ThisDrawing.Utility.GetPoint(, "Select a contour line: ")
ssetObj.SelectAtPoint returnPnt, groupCode, dataCode
Dim objContour As AeccContour
Set objContour = ssetObj.Item(0)
objContour.RemoveAllLabels
End Sub