HOW to SUPPRESS A FEATURE GROUP

HI Guys,

I´m having some trouble to identify how can I supress a feature group and those members.
I´m trying to replace the find object from journal and I´m not sure with class I can use for it.

Dim featureGroup1 As Features.FeatureGroup = CType(workPart.Features.FindObject("FEATURE_SET(60)"), Features.FeatureGroup)

Thanks in Advanced.
TH

The code below suppresses the first feature group that is found in the part navigator. If you want to suppress a particular feature group, you will need some way of identifying that feature group through code. Giving the feature group a custom name or attribute is one common way of identifying a feature or object through code.

Option Strict Off
Imports System

Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Features

Module Module102

Dim theSession As Session = Session.GetSession()
Dim theUFSession As UFSession = UFSession.GetUFSession()

Sub Main()

Dim workPart As Part = theSession.Parts.Work
theSession.EnableRedo(False)

Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Suppress feature group")

For Each tempFeat As Feature In theSession.Parts.Work.Features
If TypeOf (tempFeat) Is Features.FeatureGroup Then
tempFeat.Suppress()
Exit For
End If
Next

End Sub

Public Function GetUnloadOption(ByVal dummy As String) As Integer
Return Session.LibraryUnloadOption.Immediately
End Function

End Module