NX Open Programmer's Guide > User Defined Objects > Sample Code
Sample Code
Sample UDO programs exist for VB, C#, C++, and Java at:
%UGII_BASE_DIR%\UGOPEN\SampleNXOpenApplications\<programming language>\UDO
Each program creates a simple UDO demonstrating these callbacks: Display, Selection, Attention Point, Fit, Edit, Information.
Run via NX: File tab → Execute → NX Open.... The program opens a new part if none is open, then prompts for a screen position — the UDO displays as a triangle at that point with a name indicating which language created it. Running all four language samples in one part shows (left to right): VB .NET UDO, C# UDO, C++ UDO, Java UDO.
The sample UDO is selectable: Menu→Information→Object on it prints custom info from the myInfoCB function. Right-click → "Edit User Defined Object" invokes myEditCB, prompting for a new screen position and moving the UDO there.
See also: Stop/end UDO FeatureBuilder.
Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.nxopen_prog_guide/genid_sample_code_50_55232 · retrieved Tue Jul 07 2026 00:00:00 GMT+0000 (Coordinated Universal Time)