View Full Version : VCDID_WhiteBalance : rangeproperty not found...

June 16, 2010, 23:15:30
Dear support forum,

After 6 months without touching a single line of code, I'm back trying to get everything working with ICImagingcontrol and Delphi.
I've stopped using the ActiveX properties and started using the VCDSimpleproperties instead.

I'm trying to read the properties of a TIS 41AG02.AS camera (color) and have an issue with the VCDID_WhiteBalance property
Even though the VCDProp.Available method says that the property is available, when I try to read it (for example, trying to get the min range value) I get the following error message.
This happens when stepping into the GetVCDPropertyRange procedure, GetRangeMin method and finally fetchCheckedRangeItf function.

{284C0E0D-010B-45BF-8291-09D90A459B28]:{B57D3000-0AC6-4819-A609-272A33140ACA}:{99B44940-BFE1-4083-ADA1-BE703F4B8E03} not found

Of course, it is a custom message, but I don't understand why the available method returns "true" and then the range property is not found...
Does the VCDID_WhiteBalance property have to be used/read in a particular way ?

Here are the bits of code used.
(TRB_WhiteBalance is a TTrackbar component)
(Enabled is a boolean property of TRB_Whitebalance)

declarations :

TmpVCDProp : TVCDSimpleProperty;

Main part

With Form.TRB_Whitebalance do
Enabled := TmpVCDProp.Available(VCDID_WhiteBalance);
If Enabled then
GetVCDPropertyRange(Form.ICImagingControl,TmpVCDPr op,VCDID_WhiteBalance,MinValue,MaxValue,Value,Auto );
Form.LBL_WhiteBalance.Enabled := Enabled;
Form.EDT_WhiteBalance.Enabled := Enabled;
Form.UPD_WhiteBalance.Enabled := Enabled;
Min := Round(MinValue);
ASCamera.CameraProperty[ASVideoProcamp_Whitebalance].MinValue := Min;
Position := Min;
Max := Round(MaxValue);
ASCamera.CameraProperty[ASVideoProcamp_Whitebalance].MaxValue := Max;
Position := Round(Value);
ASCamera.CameraProperty[ASVideoProcamp_Whitebalance].Value := Position;

GetVCDPropertyRange procedure

Procedure GetVCDPropertyRange(Control : TICImagingControl;VCDProp : TVCDSimpleProperty;
const ItemID : WideString;
Var Min,Max,Value : Double;
Var Auto : Boolean);
if Control.DeviceValid = True then
Min := VCDProp.GetRangeMin(ItemID);
Max := VCDProp.GetRangeMax(ItemID);
Value := VCDProp.GetRangeValue(ItemID);
Auto := VCDProp.AutoAvailable(ItemID);

GetrangeMin description

Function TVCDSimpleProperty.GetRangeMin(id : WideString) : Longint;
Var RangeProp : VCDRangeProperty;
RangeProp := fetchCheckedRangeItf(id, internalTree);
RangeMin := RangeProp.RangeMin Div RangeProp.Delta;
Result := RangeMin;

Function fetchCheckedRangeItf(itemId : WideString; props : VCDPropertyItems) : VCDRangeProperty;
irange : VCDRangeProperty;
itf : VCDPropertyInterface;
id : WideString;
If itemId = VCDElement_WhiteBalanceBlue Then
id := VCDID_WhiteBalance + ':' + VCDElement_WhiteBalanceBlue
If itemId = VCDElement_WhiteBalanceRed Then
id := VCDID_WhiteBalance + ':' + VCDElement_WhiteBalanceRed
If itemId = VCDElement_GPIOIn Then
id := VCDID_GPIO + ':' + VCDElement_GPIOIn
If itemId = VCDElement_GPIOOut Then
id := VCDID_GPIO + ':' + VCDElement_GPIOOut
If itemId = VCDElement_StrobeDelay Then
id := VCDID_Strobe + ':' + VCDElement_StrobeDelay
If itemId = VCDElement_StrobeDuration Then
id := VCDID_Strobe + ':' + VCDElement_StrobeDuration
id := itemId + ':' + VCDElement_Value;
id := id + ':' + VCDInterface_Range;
irange := VCDRangeProperty(props.FindInterface(id));
If irange <> nil Then
result := irange
ShowMessage('RangeProperty '+ id + ' not found');
ShowMessage('RangeProperty '+ id + ' not found');

The other VCDID_xxxxxx properties work perfectly, I have the issue only with this VCDID_WhiteBalance property.

Thank you for any idea.

Best regards
Axel Canicio

Stefan Geissler
June 17, 2010, 13:00:10

In VB6 you can use this:

With ICImagingControl1
Set WBRed = .VCDPropertyItems.FindInterface(VCDID_WhiteBalance + ":" + _
VCDElement_WhiteBalanceRed + ":" + _

Set WBBlue = .VCDPropertyItems.FindInterface(VCDID_WhiteBalance + ":" + _
VCDElement_WhiteBalanceBlue + ":" + _

End With

June 17, 2010, 14:10:02
Dear Stefan,

Thank you for your quick reply :-)

Does this mean that VCDID_WhiteBalance must be used with either VCDElement_WhiteBalanceRed or VCDElement_WhiteBalanceBlue, and not standalone with the classic VCDElement_Value property ?

Since I have implemented both VCDElement_WhiteBalanceRed and VCDElement_WhiteBalanceBlue in the fetchCheckedRangeItf function, it means that I need to throw away VCDID_WhiteBalance and process separately both red and blue components of White balance :

With Form.TRB_WhitebalanceRed do
Enabled := TmpVCDProp.Available(VCDElement_WhiteBalanceRed);
If Enabled then
GetVCDPropertyRange(Form.ICImagingControl,TmpVCDPr op,VCDElement_WhiteBalanceRed,MinValue,MaxValue,Va lue,Auto);

// snip//

With Form.TRB_WhitebalanceBlue do
Enabled := TmpVCDProp.Available(VCDElement_WhiteBalanceBlue);
If Enabled then
GetVCDPropertyRange(Form.ICImagingControl,TmpVCDPr op,VCDElement_WhiteBalanceBlue,MinValue,MaxValue,V alue,Auto);

This use of either VCDID_xxx or VCDElement_xxx is confusing...

Thank you
Best regards

June 19, 2010, 12:23:59
Dear Stefan,

I tried your last suggestions but unfortunately it still did not work.

BUT !!!! I think I found the real reason why it was not working.

I found this old thread on the ICImagingcontrol C++ Class forum


So I looked at what was happening in the folders of my development computer.

I already had a previous installation of IC Imaging control (V3.0) that was originally put in the following folder :

"C:\Program Files\Common files\IC Imaging Control 3"

But the installation program of ICImagingControl 3.1 put the files in the following folder instead :

"C:\Program Files\Fichiers communs\IC Imaging Control 3"
This is the "common files" folder for all "french" versions of windows.

Using a utility called Sysinternals File Monitor (freeware), I noticed that when starting my application, the system files for IC Imaging control were systematically read from the "english" common files folder.
The difference between both folders is that the file called "gigecam_vc71.vda" was missing from the latter.
I therefore copied the file from the french to the english common file folder and now IT WORKS !!

I just wanted to share this information for users of french versions of windows so that they can check that the VDA files are put in the correct folder.

Thank you again.
Best regards
Axel Canicio

Stefan Geissler
June 21, 2010, 09:54:01
Hello Axel,

this is not a problem of the french version, it is a problem of an old ActiveX setup. As mentioned, the ActiveX support has ended, thus the GigE camera support may is not included in the IC 3.0 setup.

June 27, 2010, 19:09:04
OK. Thank you. I'll see if I can clean things up.