Showing results for 
Search instead for 
Did you mean: 

Reset button

Solution Partner Genius Solution Partner Genius
Solution Partner Genius



I´m doing a NXOpen application with C#. In the callbacks initialize_cb() and dialogShown_cb I put my code according about values of the *.dlx.


The first time that I show the window, this have the default values, but the next times, the values are the inputs of the user.


My problem is when I reset the dialog, internally NX call to initialize_cb() and dialogShown_cb.


Can I distinguish between press the reset icon and open my window?


Many thanks,


Best regards,




Re: Reset button

Gears Phenom Gears Phenom
Gears Phenom

I have defined all my "default" values in the Public Sub dialogShown_cb() and it seems to work. Every time I open the GUI , the "correct" values are shown regardign of what hte user has put/selected previously

Production: NX.CAE, NX.CAE
Development: VB.NET (amateur level !)

Re: Reset button

Siemens Phenom Siemens Phenom
Siemens Phenom

What you are seeing is dialog memory. NX will, by default, "remember" the last input and make those the defaults the next time the dialog is shown.


Most Block Styler blocks have a "RetainValue" boolean property. If you set that to False, the value for that block will not be stored in dialog memory.


If you don't set that, or for blocks that don't have that property, you can specify the default value that you want to see in the dialogShown callback. This callback is executed immediately prior to showing the dialog (after NX has read the values from dialog memory).

Re: Reset button

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Mi aplication is a MillUser CAM.


I dont have only 1 window. Its possible that I have 4 windows in my part at same time.4 objets from the same window, and dialogmemory knows the last window. For this, I store the user values in UDO linked to the Oper. 


In the callback dialogShown_cb I put the default values if there is the first time, and the user values if the UDO exists. This work fine, but when I press icon reset,NX call to dialogShown_cb again and put the values of the UDO. For this reason I need some difference about icon reset and create the window.


Maybe my mistake is how to I developed the application from the beginning...