Hello, I use NXOpen to generate geometry (points, sweep, thicken… delete unneeded features).
I organize all these features in different groups (using
I notice with short examples that the tree (part navigator) is not up to date at the end. I need to make an action (create feature, deactivate a feature…) to update it.
I do not know if it is linked: with the same model, same actions, same script, sometimes it work, sometimes not ... and I have the following exception message send by AddMembersWithRelocation function:
The following features are already members of feature groups, and therefore cannot be placed in an embedding feature group.
Sometimes in debug mode, more often in release. It looks like something is not up to date (actions not yet performed in background?)
Thanks for your help.
You could try calling Update.DoUpdate(). Almost any Journal that you record that performs Modeling actions will have an example that demonstrates this.
The .ColorFeatureGroupBuilder does not create feature groups, but assigns a color to an existing feature group.
The link below has some code examples for creating feature groups.
In addition to the examples cowski mentioned, we have at least one on the Solution Center:
If the link fails, just search for "nx_api4094".
It uses a wrapper method that relies on a function from the days when we called these Feature Sets, rather than Feature Groups.
This was created in Open C, but of course you can use the Open C calls demonstrated in this example with your NX Open C++ code - see the "interop" examples in the samples provided with NX or on the Solution Center website.