Supress if no effect

Supress if no effect

ASchlaack
Collaborator Collaborator
1,942 Views
21 Replies
Message 1 of 22

Supress if no effect

ASchlaack
Collaborator
Collaborator

Is there a rule to supress a feature (a cut) if it has no effect?

Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes
Accepted solutions (1)
1,943 Views
21 Replies
Replies (21)
Message 21 of 22

rjay75
Collaborator
Collaborator
Accepted solution

Here's a way to check for specific features

 

Call by findSickFeaturesByName(doc, New String() { "extrusion3", "extrusion4" })

 

Public Sub findSickFeaturesByName(doc As PartDocument, names As String())

Dim feature As PartFeature
Dim features As Features


features = doc.ComponentDefinition.Features

For Each feature In features
    If names.Contains(feature.Name) And feature.HealthStatus <> kUpToDateHealth And feature.HealthStatus <> kSuppressedHealth Then
        MsgBox("There's a problem with one of the features. Check your parameters. Problem feature: " & feature.Name, vbOKOnly, "UnHealthy Feature Detected!")
        Exit Sub
    End If
Next

End Sub

 

 

Message 22 of 22

ASchlaack
Collaborator
Collaborator
You're the man! that's the code I needed! Thanks for all your time.
Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
0 Likes