NXKnowledge

NX Open C++ Reference Guide > Namespaces > NXOpen::UF

NXOpen::UF Namespace Reference (C++) — User Function API interop

Documented purpose: "Provides classes and interfaces to the UF API."

Structurally different from every other namespace in this book

Unlike NXOpen::Features, NXOpen::Assemblies, NXOpen::Positioning, or NXOpen::BlockStyler — which are all class-and-object-oriented — the NXOpen::UF namespace root page contains no classes and no sub-namespaces. Its Doxygen page has only three sections: "Namespace Members" (an alphabetical function index, a through z), "Functions" (the same, organized by function-name-initial), and "Enumerations". This is the object-model-free User Function (UF) API — NX's older, C-style, procedural API (UF_* prefixed functions such as UF_initialize, UF_MODL_*, UF_ASSEM_*, UF_CURVE_*, etc.) — surfaced into the C++ NXOpen binding as free functions and enum constants inside the NXOpen::UF namespace, rather than as objects with methods.

Why it exists alongside the object-oriented NXOpen API

NX Open's primary, modern API is the object-oriented one documented in the other namespace files in this folder (Session, Part, Feature, Component, UIBlock, etc.). The UF API predates it and is still the only way to reach certain lower-level or legacy functionality that the object-oriented layer hasn't (yet, or ever will) wrap. NX Open C++/.NET/ Java/Python applications can call into UF functions directly when the higher-level API doesn't expose a needed capability — this is the documented escape hatch, and it is why NXOpen::UF exists as a namespace in every language binding rather than only in raw C.

How this surfaces per language (cross-reference)

  • C++: functions and enums live directly under NXOpen::UF::<Area> (sub-groupings by functional area corresponding to the classic uf_*.h header groupings, e.g. modeling, assemblies, curves) as ordinary C++ free functions — call them like any other namespaced C++ function once the UF session is initialized (typically automatic when running inside an NX Open session/environment).
  • .NET / Java / Python: the equivalent interop is typically exposed via a UF or NXOpen.UF-style module/class that wraps the same underlying C functions with language-appropriate calling conventions (static methods on per-area classes rather than free functions) — see nxopen-dotnet-reference/, nxopen-java-reference/, and nxopen-python-reference/ for the language-specific surfacing pattern where captured in this pass. Consult the NX Open Programmer's Guide ("User Function" / "UF" sections) for the canonical description of how the object-oriented API and the UF API interoperate (e.g. converting an NXOpen object handle to/from a UF tag_t).

Practical note

Because this namespace has no classes to summarize, there is no class-level table here (unlike the other namespace files in this folder). If deeper coverage is needed later, the useful entry points are the Doxygen "Namespace Members" and "Functions" alphabetical indices in this book (namespacemembers.html / namespacemembers_func.html style pages) rather than a classes.html-style page.

Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.nx_open_c_plus_plus_ref · retrieved 2026-07-07