NXKnowledge

NX Open Programmer's Guide > Execution Methods > UFMENU

UFMENU

ufmenu is a utility script/command file for editing, compiling, linking, and running Open C API programs. Only supported on non-Windows workstations.

Note: Before using the Link option, the environment variable UGII_USERFCN must point to the directory containing your Open C API library file(s); if unset, uflink defaults to the standard installation directory.

Invoke ufmenu by selecting the UGOPEN-API option from ugmenu. This displays:

+--------------------------------------+
|USER FUNCTION DEVELOPMENT ENVIRONMENT |
+--------------------------------------+
1) Edit             5) change Directory
2) Compile          6) liSt directory
3) Link             7) Non-menu activities
4) Run (external user function)   q) Quit
Enter option (1-7, q) [q]:

Options

  • Edit — Edit a file with the OS editor specified by UGII_EDITOR (default e.g. vi). Prompts for file(s); full path needed if not in the current directory.
  • Compile — Invokes the C/C++ compiler to build object files from source. Accepts multiple space-delimited filenames; auto-selects platform-appropriate compile switches. You can choose to customize compile options — ufmenu asks whether the target is internal or external, which default options to remove, and any new options to add. If compilation fails, an error log named username<pid>.complog is created in the current directory.
  • Link — Links the primary program's object file with any referenced subprogram object files, via the uflink utility. The main object file must be in the current directory. Requires UGII_USERFCN to point at the Open C API library (else defaults to the install directory).
  • Run (external user function) — Runs an external user function.
  • change Directory — Change the current working directory.
  • liSt directory — Lists files matching a template (default *) in the current directory.
  • Non-menu activities — Spawns a child shell process; prompts for shell type (sh/csh/ksh, default ksh).

Related Topics

  • Journals with the Journal Manager
  • Interactive NX (File → Execute → NX Open...)
  • Approaches for running custom programs in NX
  • Automatically at NX Start up
  • User Exits
  • Remote Processes
  • Executing Applications from GRIP

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