Why do I Receive an Error when adding a CWIMAQ Control to a Visual Studio .NET Application? Primary Software: Driver Software>>NI-IMAQPrimary Software Version: 3.5.1 Primary Software Fixed Version: N/A Secondary Software: Measurement Studio>>.NET Support
Problem: When I try to add the CWIMAQ control from the toolbox in a Visual Studio .NET Project I receive the following error: Solution: This error occurs when you have added the "ActiveX" or "COM" components to your toolbox instead of the .NET Interop Assemblies. As of Vision 7.0 we have included in the drivers .NET Wrappers called Interops (interoperability) for all of the functions. The functions are all still ActiveX components but with the wrappers you can call them in a .NET application This was done because when adding an ActiveX component to a Visual Studio .NET project it tries to automatically create this "wrapper", which is just a .NET assembly that communicates with the ActiveX components, which then fails and you receive an error similar to the one above. To add the .NET Interop Assembly to your toolbox follow these directions: 1. Right click on the Toolbox and choose to "Add/Remove Items" 2. Choose the "COM Components" tab at the top of the dialog box 3. Uncheck any CWIMAQ controls 4. Choose the ".NET Framework Components" 6. Click "OK" The following is a screenshot of how you can tell the difference between an ActiveX component and a .NET Interop component in the toolbox. Note: The .NET Assemblies are for .NET applications only. If creating an older non .NET Application use the "COM" components instead. Related Links: KnowledgeBase 40UFOQS4: IMAQ Vision for Measurement Studio 6 Does Not Support .NET KnowledgeBase 3FBELMKZ: Do NI-IMAQ and NI Vision Support Microsoft Visual Studio .NET? Attachments:
Report Date: 03/16/2007 Last Updated: 03/17/2007 Document ID: 47FFOOP6 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
