Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx is not member of NIDAQmxCAPI in Visual Studio 2008

Solved!
Go to solution
Hi all,
 
I am converting code from Visual Basic 6.0 to Visual Studio 2008. I have included a reference to the NIDAQmxCAPI into the VB project.

I get the following error:

"DAQmx is not member of NIDAQmxCAPI"

Here is a snippet of the code that causes the problem but the same thing appears in other places as well

'Create the DAQmx task.

 

DAQmxErrChk(NIDAQmxCAPI.DAQmx.DAQmxCreateTask("", taskHandle))

 
I was wondering if anyone would be willing to give me some suggestions on what to do?
 
Thanks!
0 Kudos
Message 1 of 3
(3,247 Views)
Solution
Accepted by topic author bwang78

Hi BWang78,

 

If you're working in VB or VB .NET, why are you referencing the C API? This sounds like you may be looking at an example from the ANSI C folder- you may have better luck looking in the example folders listed here, that are designed for use in the language you're using.

 

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 2 of 3
(3,207 Views)

Hi Kathryn,

 

Thank you for your suggestion! 

I am now converting VB6 to VS2012 instead.  The examples in 

C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.5

are useful!

 

Besides,

1. I changed target framework from ‘.NET Framework 2.0’ to ‘.NET Framework 4.5’

2. I added "National Instruments Common" and "National Instruments DAQmx" as the references.

 

It works now.

0 Kudos
Message 3 of 3
(3,141 Views)