Hy, in the CAD programm SiemensNX i have an active Work Part. Inside this WorkPart i have some features (for example curves). For this features i create a FeatureGroup, like a folder with documents in the windows explorer. Now i try to find over the programming interface NxOpen all FeatureGroups in the active WorkPart. I do this in C# but any help in VBA should be also ok for me.
I try this:
foreach(FeatureGroup FGroupX in workpart.Features)
{
do something with current FGroupX ...
}
The "workpart.features" give me an collection of all features in the active WorkPart. But the for-loop chrashes for every feature of this collection which is not from type "Featuregroup".
Is there another suitable solution to find all FeatureGroups in the active WorkPart?
Solved it with an additional if-check of the feature type: