Where to find the _sNXUNIT_ID of my NX unit?
Some commonly used function blocks, such as the NX_ReadObj or NX_SaveParam, require the path to the NX unit as a parameter. If this parameter is omitted, the default value is not applied and a building error will occur.
This is a structure called UnitProxy in the manuals, of the type _sNXUNIT_ID:
To access the _sNXUNIT_ID of your unit (here a NX-OD4256), open the I/O map then right click on the unit and select "Display Node Location Port".
The _sNXUNIT_ID of your unit is now available. Just add a variable name to use it in your program.