Here's an iLogic and VBA solution 😉
iLogic:
oDoc = ThisDoc.Document
oFeatures = oDoc.ComponentDefinition.Features
Try
oFeatures("NameOfYourFeature").Delete
Catch
MsgBox("No feature exists with that name")
End Try
VBA: Could be shorter, but like the check on the name.
Public Sub RemoveFeature()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
Dim oFeature As PartFeature
Dim oFeatures As PartFeatures
Set oFeatures = oDoc.ComponentDefinition.Features
For Each oFeature In oFeatures
If oFeature.Name = "NameOfYourFeature" Then
oFeature.Delete
End If
Next
End Sub
Hope this helps.
Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.