NX Open Programmer's Guide > Executing NX Open Automation > Execution Methods > Automatically at NX Start up
Automatically at NX Start up
NX loads all application libraries under the startup directory (custom root
dir) at NX load: internal libraries first, then custom startup libraries,
then immediately executes the standard entry point for each. Per-language entry
points:
| Language | Signature |
|---|---|
| C/C++ | int ufsta( void ) |
| VB.NET | Function Startup() As Integer |
| Java | int startup(void) |
| Python | def startup(argc, args): return <number> |
Custom code at startup should be restricted to methods on session objects (no active part yet) — e.g. registering part/UDO callbacks, registering dialog boxes. Startup is the recommended place when:
- Registering dialogs for menu bar/toolbar buttons, when customized
.menfiles reference UI Styler or Block Styler dialogs (see "Dialog from Menu or Toolbar"). - Registering UDO callbacks (display/edit/update/delete etc. — specific to a UDO class).
- Registering part callbacks (Part Open/Close/Save/New etc.) so NX invokes the custom module on part actions.
Unloading: if the app registered part or UDO callbacks, it must only unload
at termination (see "Unload Options") — matches our
ufusr_ask_unload() → Session::LibraryUnloadOptionAtTermination pattern in
ArchitectureTab.cpp.
Relevance to spine-panel-kit
Directly confirms our existing pattern: ufsta() in ArchitectureTab.cpp
creates the resource-bar tab and registers the activation callback at NX
startup, exactly per this doc's guidance. No changes indicated — this is
corroboration, not a new finding.
Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.nxopen_prog_guide/executing_at_startup · retrieved Tue Jul 07 2026 00:00:00 GMT+0000 (Coordinated Universal Time)