NX Open Programmer's Guide > Executing NX Open Automation > Application Directory Structure
Application Directory Structure
For any root directory specified by the environment variables (see Environment Variables), NX looks for five subdirectories: startup, application, udo, udf, dfa.
Caution: Files in these subdirectories cannot share a name with any directory below the root (including these five) — this can cause errors during program execution.
You can set up multiple application roots (see Environment Variables for how to define one).
Subdirectory Usage
| Subdirectory | Usage |
|---|---|
startup |
Custom menu files, dialog files, and executables loaded by NX during initialization of an interactive session (not external programs). Used for general-functionality applications. A menu file placed here can define a new application button via a MENU_FILES statement (read from the vendor/site app directory the first time the user enters the application), or re-specify an existing application button's definition to extend it by appending to MENU_FILES. |
application |
Custom menu items and executables associated with a new application added to the NX start menu, or an existing NX application. |
udo |
Executables that register methods during NX initialization to manage User Defined Objects (see UDO Overview). |
dfa |
Knowledge Fusion ASCII definition files for classes, functions, and methods for this application. Does not display in the DFA Manager or KF Preferences. |
udf |
Application-specific User Defined Features. |
For configuring a Knowledge Fusion application via environment variables/customer defaults, see "Defaults and Variables Overview" in the Knowledge Fusion online help.
Application Startup
- Starting an NX interactive session automatically loads libraries/menu files in both
startupandudo. - Starting an external NX Open customization program loads only libraries in
udo. - As NX loads each shared library it immediately executes the standard entry point (see "Entry Points" for user exits in all supported languages), which can initialize event handlers for menu, dialog, and UDO actions.
To speed NX startup, libraries can be placed in application instead of startup — then NX loads the library only when the user selects the associated menu button, rather than at startup. This strategy cannot be used for UDO-managing applications — UDO apps must load at startup so event handlers are available when parts load.
Example: adding //user/myhome to the file defined by UGII_CUSTOM_DIRECTORY_FILE, then placing shared libraries in //user/myhome/udo, allows the application to run for both interactive and external NX sessions.
Dynamically Loaded Libraries
Shared libraries in these subdirectories must use the correct OS file extension (.dll on Windows, .so on Linux). Wrong/missing extensions cause NX to fail to find the file and report it as not properly registered.
Applications Needing Windows Disabled
Use the report_custom_dirs utility to audit which programs need to run with multiple windows disabled — see "Application directory report utility".
Related Topics
- Execution Overview
- Execution Modes
- Environment Variables
- How to Execute the Open API
- Unload Options
Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.nxopen_prog_guide/genid_application_root_directory_48_1916 · retrieved Tue Jul 07 2026 00:00:00 GMT+0000 (Coordinated Universal Time)