Cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a virtual command text into the Model History Tree?

Experimenter
Experimenter

I have defined a custom ribbon toolbar in NX 11. When any button on this toolbar is pressed, the related callback C function executes. In this execution, we want to add the name of the pressed button to the Model History Tree as a virtual command. The designer may push more than one button in any order. These different virtual commands will be added to the Model History Tree in the same order.

 

How can we add a virtual command text to the Model History Tree? Thank you for any suggestion.

 

Atila

 

7 REPLIES

Re: How to add a virtual command text into the Model History Tree?

Esteemed Contributor
Esteemed Contributor

You could create a feature group, add all features created by the button command to the group or just leave it empty, so it only acts as a marker.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community

Re: How to add a virtual command text into the Model History Tree?

Experimenter
Experimenter

Thank you Stefan. Can you share or suggest C code sample which creates Feature Group and adds a single dummy feature name into Model History Tree?

 

Thanks a lot

 

 

Re: How to add a virtual command text into the Model History Tree?

Esteemed Contributor
Esteemed Contributor

I don't think there is support for this in C, since NXOpen C is no longer actively maintained.

Better you migrate to one of the manged NXOpen languages, which are actively managed and enhanced.

I don't have any examples, but you could always record a journal in your preferred NXOpen language of the interactive procedure.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community

Re: How to add a virtual command text into the Model History Tree?

Phenom
Phenom

Actually it is possible in C using UF_MODL_create_set_of_feature().

However it requires an array of features to add to the feature set. I'm not sure how it would handle an empty array Man Tongue

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: How to add a virtual command text into the Model History Tree?

Experimenter
Experimenter

Thank you for your advice Graham. I have tried to record a journal with C, Java, C#, Py and VB. When a new Feature Group or Feature Group member created manually, Feature Group creation commands never recorded.

Also the documentation and sample codes (..\NX 11.0\UGOPEN) are not helpful for dummy Feature Group creation. 

 

Can anybody share a line(s) of code to create Feature Group under Part Navigator / Model History in any language?

 

Thanks a lot

 

Re: How to add a virtual command text into the Model History Tree?

Phenom
Phenom

If you go to the solution centre HERE and search for nx_api4094 you'll find an example using VB that calls the VB wrapper for UF_MODL_create_set_of_feature().

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: How to add a virtual command text into the Model History Tree?

Experimenter
Experimenter

Now we are able to create a Virtual Feature Group and Virtual Feature Members under this group with the use of  UF_MODL_create_set_of_feature() and FeatureGroup->AddMembersWithRelocation().

 

Thank you for your support Graham.