Open C++ Programmer's Guide > Introduction
Introduction
Open C++ is an object-oriented programming interface to NX: it gives access to NX objects and functionality through a C++ class hierarchy. Methods on these classes let you create, read, and modify NX objects, and control the NX application itself.
Benefits of Open C++ over the older, procedural Open C API:
- Standard C++ syntax, usually more concise/readable than Open C.
- Objects are referenced via pointers to C++ objects rather than tags — a more natural, expressive style.
- Errors are reported through C++ exceptions, so error handling can be localized instead of checking a return code after every call.
- Strongly typed — calling a method on the wrong kind of NX object is a compile-time error, not a runtime one.
- C++ encapsulation makes it easy to see which functions apply to a given object type.
- Standard C++ inheritance lets you derive new classes and override virtuals
(e.g. to define what
Updatemeans for your new object type). - Interoperable with Open C: objects created via Open C++ can be accessed from Open C calls, and vice versa.
- Context-managed object creation — every create method takes the owning part explicitly.
- Unifies evaluation/inquiry of curves and edges — no special-casing wireframe curves vs. solid edges.
- Objects can be edited without first checking whether they are a prototype or an occurrence.
Open C++ sits on top of the Open C library, acting as a relatively thin C++ layer over it. It actually consists of two libraries:
openpp— access to NX objects and functionality.vmathpp— a vector math package for general-purpose mathematical operations.
Open C++ applications can be written as:
- Internal applications — a shared library (UNIX) or DLL (Windows NT), executed during an interactive NX session.
- External applications — a stand-alone executable that runs outside an NX session.
Detailed documentation for every Open C++ class and method is provided via a separate set of HTML pages (the "Open C++ Library" reference — not duplicated in this note set).
Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.open_c_plus_plus_program · retrieved Tue Jul 07 2026 00:00:00 GMT+0000 (Coordinated Universal Time)