Cancel
Showing results for 
Search instead for 
Did you mean: 

Feature and Feature Group use/update

Siemens Creator Siemens Creator
Siemens Creator

Hello, I use NXOpen to generate geometry (points, sweep, thicken… delete unneeded features).

I organize all these features in different groups (using

Features::FeatureGroup::AddMembersWithRelocation()

).

 

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.

 

  • How can I do to update this tree at the end of my script?

 

 

I do not know if it is linked: with the same model, same actions, same script, sometimes it work, sometimes not Cat Sad ... 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?)Man Frustrated

  • Is someone have an idea ?

 

Thanks for your help.

6 REPLIES

Re: Feature and Feature Group use/update

Siemens Phenom Siemens Phenom
Siemens Phenom

 

You could try calling Update.DoUpdate().  Almost any Journal that you record that performs Modeling actions will have an example that demonstrates this.

 

Re: Feature and Feature Group use/update

Siemens Pioneer Siemens Pioneer
Siemens Pioneer
Side question,
Is "NXOpen::Features::ColorFeatureGroupBuilder" the builder to construct the feature group in NX Open?

I tried to journal the creation of feature group and NX but nothing is recorded. Smiley Sad

Re: Feature and Feature Group use/update

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

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.

http://nxjournaling.com/content/creating-new-feature-group

Re: Feature and Feature Group use/update

Siemens Phenom Siemens Phenom
Siemens Phenom

In addition to the examples cowski mentioned, we have at least one on the Solution Center:

 

https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&q=sample+program+create...

 

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.

Re: Feature and Feature Group use/update

Siemens Pioneer Siemens Pioneer
Siemens Pioneer

This is for visual basic. I can't seem to find the equivalent in C++. How do I do that in c++?

 

Thanks!

Re: Feature and Feature Group use/update

Siemens Phenom Siemens Phenom
Siemens Phenom

https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&q=sample+program+featur...nx_api2524&k=4&o=0

 

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.