GetFeature
Top  Previous  Next

Description

Returns the numerical value of the specified camera feature.


Syntax


[VB]
Value=objActiveGige.GetFeature( Name )


[C/C++]
HRESULT GetFeature(bstr Name, float* pValue );


Data Types
[VB]

Name: String
Return value
: Single


Parameters
[C/C++]

Name [in]  
String specifying the name of the feature  
pValue [out, retval]  
Pointer to the numerical value of the feature  


Return Values


S_OK  
Success  
E_NOINTERFACE        
Feature does not exist or not available  
E_FAIL  
Failed to read the feature  
 

Example


The following VB example demonstrates the use of a scroll control for real-time adjustment of the "GainRaw" feature.

Private Sub
 Form_Load()

ActiveGige1.Acquire=
True

HScroll1.Value = ActiveGige1.GetFeature("GainRaw")
HScroll1.Min = ActiveGige1.GetFeatureMin("GainRaw")
HScroll1.Max = ActiveGige1.GetFeatureMax("GainRaw")
End Sub


Private Sub
 HScroll1_Scroll()

ActiveGige1.SetFeature("GainRaw", HScroll1.Value)

End Sub

 

Remarks


Depending on the Type of the feature GetFeature will return the following values:

Feature Type
Return value
Integer
Integer value converted to floating point
Float
Floating point value
Boolean
0 if False, 1 if True
Enumerated
Ordinal number in the enumeration list
String
Zero value
Command
Zero value


If the currently selected camera does not support the specified feature, the method will generate an error.

To retrieve the string value of a feature, use GetFeatureString.