View Full Version : String value

March 8, 2011, 10:54:05

when i use the function "VCDProp.RangeValue[VCDIDs.VCDID_Exposure]" to get the current value of exposure time, i obtain a numerical value.
In DemoApp, the prgramm show litterals values like "1/18sec" ...
How can i obtain these values ?



March 9, 2011, 15:35:51
Is it with "VCDMapStringsProperty" ?

I dont understand how to use it ?

Need Help

Stefan Geissler
March 9, 2011, 16:06:17
These values are calculated from the float values returned by the exposure property. Converting a float value to the fraction kind display should be not as hard.

However, using a slider is little bit different. You can not use a slider for float values. If you start at 0.0001 and end at 4.0, then it is very hard to use a slider. Thus you may use an array containing e.g. 100 float values. The slider you create has 100 steps and each step is used as index to your array. In the array you have 100 float values, which cover the exposure times values you need. You can set a second array of strings, that contain the fractions e.g "1/4" for 0.25 etc. and use this second array for display.

March 9, 2011, 17:16:03
I found it !!

It was the absolute value

Exposure = ImagingControl.VCDPropertyItems.FindItem(VCDIDs.VC DID_Exposure);
ExposureValue = (VCDAbsoluteValueProperty)Exposure.Elements.FindIn terface(VCDIDs.VCDElement_Value + ":" + VCDIDs.VCDInterface_AbsoluteValue);

Stefan Geissler
March 9, 2011, 17:19:10
Ah, I am very sorry, it seems, I misunderstood your question.