Camera
Top  Previous  Next

Description

Returns or sets the index of the currently selected camera. If no GigE Vision™ camera is connected to the system, the property will return -1.


Syntax

[VB]
objActiveGige.Camera [= Value]


[C/C++]
HRESULT get_Camera( long *pCamera );
HRESULT put_Camera( long Camera );



Data Type
[VB]

Long


Parameters
[C/C++]

pCamera [out, retval]  
Pointer to the camera's index  
Camera [in]  
The index of the camera to be selected  


Return Values


S_OK  
Success  
E_FAIL  
The selected camera doesn't comply with GigE Vision™ specifications  
E_INVALIDARG  
The camera's index is out of range.  
 

Example


This VB example initializes a combo box with camera names and uses it to switch between the cameras:

Private Sub
 Form_Load()
CamLst = ActiveGige1.GetCameraList
For
 i = 0 
To
 
UBound
(CamLst)
Combo1.AddItem (CamLst(i))
Next

Combo1.ListIndex = 0
ActiveGige1.Acquire = 
True
End Sub

Private Sub
 Combo1_Click()
ActiveGige1.Camera = Combo1.ListIndex
End Sub

 

Remarks


The value of the property is a zero-based index into the list of GigE Vision™ cameras discovered on the network. The list of camera names can be retrieved with GetCameraList. If you use the property window of your development environment or ActiveGige's property pages, the Camera property field will be presented as a list box containing the indexes and names of all the connected cameras.