Showing results for 
Search instead for 
Do you mean 

MenuScript post action argument to journal/.dll

[ Edited ]

I have a journal that processes certain feature types. I'd like to add a POST action to the edit feature command to run this journal, passing in the feature that was just edited as an argument to the journal. I know how to specify the journal to run; is it possible to find out which feature was just edited?


Something like:

ACTIONS/POST [path_to_my_journal] - [feature_just_edited]



Re: MenuScript post action argument to journal/.dll

[ Edited ]

You do not have control on what is passed to your journal as arguments.  It will be the button name which triggered the call passed as a string.


I would not know how to do this using a journal, but I would if you use a dll and put it in the startup directory of a NX application directory structure so it resides in memory.  Using that kind of dll, I would register a callback for an ACTIONS/PRE, in which I would latch the global selection.  I would then register a second callback for the ACTIONS/POST, in which I would used the previously latched selection.  See NX Open Programmer's Guide > Execution Methods > Programs, Journals, or Callbacks from Existing Menu Items for more details on registering menu callbacks.


Many NX dialogs will automatically move the global selection to the first selector available in the dialog.  My guess is this will happen in the Edit Feature Parameter dialog.  So when you get to your post processing journal, the global selection will already have been cleared.  This is why you will need to latch the global selection.

Re: MenuScript post action argument to journal/.dll

Thanks for this. I didn't have time to fully explore this and ended up using a bit of a heavy handed approach that worked for the situation. I'd like to revisit your suggestion when my schedule allows.