Cancel
Showing results for 
Search instead for 
Did you mean: 

MenuScript post action argument to journal/.dll

Honored Contributor
Honored Contributor

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:

MODIFY
BUTTON UG_MODELING_EDIT_FEATURE_PARAMETERS
ACTIONS/POST [path_to_my_journal] - [feature_just_edited]
END_OF_MODIFY

 

2 REPLIES

Re: MenuScript post action argument to journal/.dll

Valued Contributor
Valued Contributor

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

Honored Contributor
Honored Contributor
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.