Detecting "No Effect?" Sheet Metal cuts and extrusions

Detecting "No Effect?" Sheet Metal cuts and extrusions

Anonymous
Not applicable
516 Views
1 Reply
Message 1 of 2

Detecting "No Effect?" Sheet Metal cuts and extrusions

Anonymous
Not applicable

How can I detect sheet metal cut and extrusion cut features that have the white circular model browser node icon wih the "i" insided it (toolip says "No effect?") via the Inventor API? You get this situation if the sketch does not cut any geometry. I want to delete these features.

 

Any Ideas?

 

I'm using Inventor 2012 and VB.Net.

 

Thanks!

0 Likes
Accepted solutions (1)
517 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

I found a way to do this...

 

    Private Sub RemoveStrandedCutFeatures()

        Dim oPartDoc As PartDocument
        oPartDoc = _invApp.ActiveDocument

        If oPartDoc.DocumentSubType.DocumentSubTypeID <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
            Exit Sub
        End If

        Dim oPartDef As PartComponentDefinition = oPartDoc.ComponentDefinition

        Dim oSheetMetalFeatures As SheetMetalFeatures
        oSheetMetalFeatures = oPartDef.Features

        Dim oCutFeatures As CutFeatures
        oCutFeatures = oSheetMetalFeatures.CutFeatures

        For Each Cut As CutFeature In oCutFeatures
            If Cut.HealthStatus <> HealthStatusEnum.kUpToDateHealth Then
                Cut.Delete()
            End If
        Next

    End Sub