Showing results for 
Search instead for 
Do you mean 

Show my own NX dialog instead the one automatically generated from the [solver]language.xml

Hello all,


Could you point me where to read about doing this: intercept the call to display the definition of one specific Constraint to show my own Block Styler dialog.


Is it possible in NX10?


I know how to add an entry in the menu, display my dialogs, but I do not know how to insert a callback and take the decision at that level.


I tried to intercept the solver toolkit DialogCreate but the default dialog is always shown:


//** DialogCreate
//** This function is called when a dialog creating or editing an object
//** is created. The props could be modified within the callbacks. The dialog
//** would render itself to reflect those changes.
//**    Returns 0  - no errors, no data to display
//**    Returns >0 - errors occurred, no data to display

EXPORT int DialogCreate(
  IMaster*            pMaster,    //** Pointer to master object interface
  const char*         name,       //** Instance name of the object
  IPropertyTable*     props,      //** Pointer to property table interface
  int                 mode)       //** Mode (DIALOG_CREATE, DIALOG_EDIT)
    const char* neutralName = props->AskNeutralName();
    // Show specific dialog if neutralName == my desired target

    // NOTE: return >0 does nothing, the default dialog is always shown





Then I check what the journal is doing, and I identify this:


Dim simBCBuilder1 As NXOpen.CAE.SimBCBuilder
simBCBuilder1 = simSimulation1.CreateBcBuilderForConstraintDescriptor("my_constraint_fixation", "lbcfamily_fixation_constraint(1)", 1)


Here... I see that I'd like to avoid CreateBcBuilderForConstraintDescriptor() call (and next related lines) to call my own DLL.


Probably I should read many topics, please point me to them... I'll do the job.



Thanks in advance!



Re: Show my own NX dialog instead the one automatically generated from the [solver]language.xml

Hi jphv,


with the solver toolkit you are able to create your own dialogs via the solverlanguage xml files.

Also you can intercept callbacks from these dialogs via so called "action" strings.


What is the purpose of displaying a dialog before another one opens up?

I guess you could easily add your needed UI elements to the xml specified dialog.


If you could descibe what you would like to do in more detail, maybe we can find a solution.




Re: Show my own NX dialog instead the one automatically generated from the [solver]language.xml

Hello MGeyer,


In the first implementation I used what you say, and with some hidden properties it was possible to disable components depending some options. Good.


The main issue is that I cannot (or I do not how to) change the items in a combobox from the solver toolkit, where I play only with IPropertyTable. By change I mean add/remove items dynamically.


This sample XML code will add a list of options that are constant:


Here I'd like to perform some "filtering" by handling actions callback.


Because this list is longer than the example, I prefer to help the user by showing only valid items and avoid him selecting/configuring things that when the click OK the dialog constraint check says "You selection is not valid in this context" (more or less).


By using NXOpen, I can manipulate the complete UI blocks, that's the reason I'd like to replace some of the default dialogs created by NX.



To complete the description...

The idea is to have a general multiphysic (MP) configuration option that will control extra options in LBC components.


Example: if the user wants to apply a material/constraint/etc., only those options enabled by that MP configuration should be displayed.


Because in the MP the couplings can be activated in any way, with the following physics I'll get to many differents combinations and it is not possible (neither good) to harcode what are the items available in the list:



I hope to clarified something Smiley Tongue

If not let me know.


Best Regards,

Juan Pablo

Re: Show my own NX dialog instead the one automatically generated from the [solver]language.xml

Hi jphv,


okay this clarifies it a bit more.

As I already tried out to change the props of a loading dialog, I found out this only seems to work when dealing with the modeling objects manager dialog...


So changing any property of a constraint for example seems to be impossible.


But to make things a bit more clear on your UI, you could use something like the following in your xml:


<PropertyLBC name="Multiphysics Pre Selection"
	     boxLabel="MP Environment"
   <DefaultValueLBC value="0"/>
<PropertyLBC name="Mechanical Mat"
<PropertyLBC name="Thermal Mat"

With this method, the user can select in which environment he's currently working and the "Material Modeling Object property" is dependent to this selection.


When the User has finished his input and hits "Apply" or "OK", you could check his input via "DialogApply" Routine in your dll code.