How can I use written code in C# on NX? (How do I compile C# code into NX?)

638 Views Asked by At

I have already written code in C# for UG NX in a .cs file, but I want to use it on NX without having to copy and paste it into NX's Journal.

I have written the code in Visual Studio and tried Ctrl + Shift + B to build the .cs file, but I received an error of:

dotnet not found

Is there a way to compile or use a .cs file into UG NX?

1

There are 1 best solutions below

0
On

No, you need a .dll or .exe file to run it on NX.

To create a .dll file, create a new project then select Class Library.

After that, you can add your code and when you're finished, press Ctrl + Shift + B to build the .dll file.

Then you can open NX, and press Ctrl + U to run the .dll file.