SetFeature
Top  Previous  Next

Description

Sets the numerical value of the specified camera feature.


Syntax


[VB]
objActiveGige.SetFeature Name, Value


[C/C++]
HRESULT SetFeature(bstr Name, float Value );


Data Types
[VB]

Name: String
Value
: Single


Parameters
[C/C++]

Name [in]  
String specifying the name of the feature  
Value [in]  
Numerical value of the feature to be set  


Return Values


S_OK  
Success  
E_NOINTERFACE        
Feature does not exist or not available  
E_INVALIDARG  
Feature is not of numerical type  
E_OUTOFMEMORY  
Value is out of range  
E_FAIL  
Failure to set 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 the Value argument has the following meaning:

Feature Type
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
N/A
Command
Use non-zero value to execute


If the currently selected camera does not support the specified feature or if the feature is read-only, the method will generate an error.

To set the string value of a feature, use SetFeatureString.