Add references from
C:\Program Files\Siemens\NX 12.0\NXBIN\managed\
NXOpen.dll
NXOpen.Guide.dll
NXOpen.UF.dll
NXOpen.Utilities.dll
NXOpenUI.dll
In NX App goto
File -> Execute -> NX Open
- Set breakpoint(s) in in your NX Open code in the Visual Studio editor
- Compile your NX Open code into a .dll
- Start NX
- In Visual Studio, pick Tools, Attach to Process
- Find the NX process (ugraf.exe) and select it as the process to attach to
- Run the NX Open dll in NX (File, Execute NXOpen)
The code will run until hitting the first break point, then it will pause and you can interrogate variables, etc. in Visual Studio.
https://docs.plm.automation.siemens.com/data_services/resources/nx/1872/nx_api/common/en_US/graphics/fileLibrary/nx/nxopen/NXOpen_Getting_Started.pdf https://docs.sw.siemens.com/en-US/product/209349590/doc/PL20191127135844554.nxopen_prog_guide/html/xid1124926