04-21-2010 09:16 AM
Hello:
I am using Imaqdx.dll component library (using NationalInstruments.Vision.Acquisition.Imaqdx;) with Visual Studio in C# for mu camera application. I can not retreive the function ImaqdxSetAttributes() to set any camera attributes.
In no way I can figure what is the function to set any camera attributes. Could anyone can tell what is the simple function to set any camera attributes or how to retreive it.
Thanks,
rafiou
04-21-2010 03:01 PM
Hello again:
I found myself how to do that. For those who still looking how to do in C# here is a sample of code who set the value of a camera attribute:
object exposureTime = (double)ExposureValue;
ImaqdxAttributeCollection attrCollection = _session2.Attributes;
int attributIndex = 63; // index of the attribute name you want to change (you can look into the ImaqdxAttributeCollection to find out the index position of that attribute ). In my camera case 63 is the Exposure TimeattrCollection[63].SetValue(exposure);
That's all. Very simple but not documented anywhere.
Rafiou
06-26-2014 09:44 PM
Hello Rafiou,
Thanks for this information. I am also creating a program in C# to get and set these camera attributes in VS2012 windows form. I am only a beginner at this, learning as I go and still having troubles.
I am having trouble accessing the - ImaqdxAttributeCollection attrCollection = _session.Attributes values.
If you can be as kind as helping me with any working code. I would greatly appreciate it.
Thanks for your time.
Chris
06-30-2014 09:40 AM
Chris,
Regarding your questions about VS2012 IMAQdx functions, there should be a number of text-based examples included in the help documentation for the IMAQdx drivers. These would be the best sources on which to base your program. It appears that the latest version of Visual Studio that includes help documentation is 2008, so reverting to that development environment would be helpful as well. If you have specific questions regarding errors or format, I would always recommend creating a new forum thread as well.