Quantcast
Channel: Dotnet/C# – Xinyustudio
Viewing all articles
Browse latest Browse all 204

Extending Unigraphics NX using C# (II) Using the Wizard

$
0
0

UgNX provides app wizard for developers to program the extension addins or plugins. The problem is that these wizards are not always successfully installed to the system. For instance, on my Windows 7 professional system, I failed to see them at the expected places.

To use the NX Open C# wizard:

Step 1.

Choose File→New→Project menu item to activate the New dialog box.

Step 2.

Under Project Types, select Visual C#.

Step 3.

From the Templates list. Select NX5_VCS  wizard or NX7 Open C# Wizard.

Step 4.

In Project Name, enter a project name. By default this becomes the name portion of the program being built. For example, a project named MyNXOpenApp produces either a MyNXOpenApp.dll or MyNXOpenApp.exe. You can override this later, if necessary.

Step 5.

Click OK and follow the on-screen instructions to create your C# project.

Compile and run. That is it.

if you fail to find the wizard in your VisualStudio.net,

  • Copy all files from the NX kit to the corresponding directories of the local Visual Studio installation.  The kit is located in:

    %UGII_BASE_DIR%\ugopen\vs_files\

To determine the correct location of the Visual Studio installation, look at the productdir registry key for each language. The key for C and C++ is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\version#\Setup\VC/productdir (where version# would be 7.1, 8.0, etc). For other languages replace the VC with either VB or VC#.

  • For each wizard, copy any files and/or folders under each subdirectory from the kit to the Visual Studio installation. This example is for the C language so substitute VB or VC# and the appropriate subdirectory for the other languages. Copy:

    %UGII_BASE_DIR%\UGOPEN\vs_files\VC\VCWizards\ to C:/program Files\Microsoft Visual Studio 8\VC\VCWizards\

    and %UGII_BASE_DIR%\UGOPEN\vs_files\VC\vcprojects\  to C:/program Files\Microsoft Visual Studio 8\VC\vcprojects\

Repeat for each language.


Posted in CAD, Dotnet/C#

Viewing all articles
Browse latest Browse all 204

Trending Articles