top of page

Effortless Guide: Executing and debugging a dll File in NX Modelling Software with Visual Studio - Beginner's Tutorial

Sep 13

2 min read

0

5

0

If you're working with NXOpen programming and want to execute a dll file in NX modelling software through Visual Studio, follow these easy steps. This guide breaks down the process in simple terms, perfect for beginners.


Step-by-Step Instructions to Execute a dll file:



Step 1: Open Your NXOpen Code in Visual Studio


  • Start by opening the NXOpen code file in Visual Studio. Make sure your project is set up properly for NXOpen programming.


Step 2: Build the Program and Create the dll File


  • Once your project is ready, save the file.

  • Click on the Build option in Visual Studio to compile the code and create the dll file.


Step 3: Attach Visual Studio to NX


  • In Visual Studio, go to the Debug menu and select Attach to Process. A pop-up window will appear showing a list of running processes.


Step 4: Select the ugraf.exe Process


  • From the list of processes, find and select ugraf.exe.

    (Note: You must have NX Modelling software installed on your PC for this step.)


Step 5: Complete the Attachment


  • After selecting the ugraf.exe process, click Attach. This action links Visual Studio to the NX software.


Step 6: Open NX Modelling Software


  • Now, open NX software on your computer.





Step 7: Access the Execute User Function Window


  • In NX, navigate to Menu > Execute > NXOpen, or use the shortcut keys Ctrl + U. This will open the Execute User Function window.


Step 8: Locate and Run the dll File


  • In the Execute User Function window, either paste the path to your dll file or browse your project folder to find it.

    (The path to your dll file is displayed in Visual Studio’s output message window after building the project.)


Step 9: Execute the dll File


  • After selecting your dll file, click OK. The file will now execute in the NX software.


Conclusion:

This process allows you to run a dll file directly in NX modelling software using Visual Studio. Whether you’re working on new projects or revisiting old ones, this method helps streamline your workflow.


Sep 13

2 min read

0

5

0