NXKnowledge

NX Open Programmer's Guide > Execution Methods > Programs, Journals, or Callbacks from Existing Menu Items > Executing Journals

Executing Journals

To run a journal from a menu item, the journal file must be placed in an application folder.

Example menu file (my_journal.men) registers a journal to run after the standard action of the UG_FILE_OPEN button. The journal creates a block in the current display part; if no part is open (e.g. the user canceled the Open Part dialog), it prints a note to the listing window instead.

VERSION 120
EDIT UG_GATEWAY_MAIN_MENUBAR
AFTER UG_FILE_NEW
  BUTTON UG_FILE_OPEN
  LABEL Open...
  ACTIONS/REPLACE STANDARD create_block.vb
END_OF_AFTER

The example journal is shown in multiple languages — NX Open for .NET (VB), and also a Python variant (create_block.py, structured with the standard if __name__ == '__main__': main() entry point). Each opens the active Session/work part, checks whether a part is loaded, and either creates a block feature or logs that no block was created.

Related Topics

  • Programs, Journals, or Callbacks from Existing Menu Items
  • Example Menu File with Actions
  • Executing Programs
  • Executing Callbacks (Menu Event Handlers)

Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.nxopen_prog_guide/existing_menu_executing_journals · retrieved Tue Jul 07 2026 00:00:00 GMT+0000 (Coordinated Universal Time)