Using NI-IMAQdx for Microsoft Visual Studio .NET

NI-IMAQdx

Using NI-IMAQdx for Microsoft Visual Studio .NET

NI-IMAQdx installs the following assemblies that enable .NET languages to interact with the driver software:

  • NationalInstruments.CWNIIMAQDX.Interop.dll
  • NationalInstruments.AxCWNIIMAQDXControlsLib.Interop.dll

Use NI Vision to display images with the included Viewer control

The CWIMAQdx assembly is installed in the NI-IMAQdx\dotNET\ Assemblies\Current directory. The AxCWIMAQControlsLib assembly is installed in the Vision\dotNET\Assemblies\Current directory. Refer to the NI-IMAQdx Function Reference Help for information about the properties, methods, and events available with these assemblies.

Creating a New .NET Application

You first must add a reference to the NI-IMAQdx assembly in your project when creating a new application. Complete the following steps to add a reference to the NI-IMAQdx assembly in Microsoft Visual Studio .NET 2003 or later:

  1. Create a new application, or open an existing one.
  2. Select Project»Add Reference.
  3. Under the .NET Framework Components tab, select NI-IMAQdx.

If you need to display acquired images, you also must add an NI Vision Viewer control to your toolbox and to your form. Complete the following steps to add the NI Vision Viewer control to the Microsoft Visual Studio .NET toolbox.

  1. With your project open, open a form in Design View.
  2. Open the Toolbox (View»Toolbox).
  3. Select the category in which you want the NI Vision controls to appear (General, Components, and so on).
  4. Select Tools»Add/Remove Toolbox Items.
  5. Under the .NET Framework Components tab, select the CWIMAQViewer control.

When the NI Vision Viewer control is in the toolbox, you can add it to your forms by clicking on the tool and drawing an area on the form. References to the NI Vision Interop Assemblies are automatically added to your project.