Hello,
I have a part in which there are some feature supress and unsupress condition. i am successfully deleteing the supresssing features. but the problem is after deleting the features sketches are remain. is there way to delete the associated sketches with the supress features using api.
My code :
Set swfeat = swmodeldoc.FirstFeature
Do While Not swfeat Is Nothing
Namefeat = swfeat.Name
If "RefPlane" = swfeat.GetTypeName Then
If Namefeat = "Front" Or Namefeat = "Top" Or Namefeat = "Right" Then
Else
boolstatus = swmodeldoc.Extension.SelectByID2(Namefeat, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
swmodeldoc.BlankRefGeom
End If
ElseIf swfeat.IsSuppressed Then
Features(k) = Namefeat
k = k + 1
End If
Set swfeat = swfeat.GetNextFeature
Loop
For k = 0 To 19
boolstatus = swmodeldoc.Extension.SelectByID2(Features(k), "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
swmodeldoc.EditDelete
Next
Thanks in advance
SolidworksApi macros