Check camera devices available in Add-in?
Dear All,
In Project Workbench, I can use 'ThisApplication.Capture.Devices.Count' to get device count.
Using 'ThisApplication.Capture.ActiveDevice.DevName' to get current device name.
But those command isn't support in Add-in Project.
How do I know if there are any camera devices available?
In Project Workbench, I can use 'ThisApplication.Capture.Devices.Count' to get device count.
Using 'ThisApplication.Capture.ActiveDevice.DevName' to get current device name.
But those command isn't support in Add-in Project.
How do I know if there are any camera devices available?
0
Best Answer
-
My mistake, I missed putting the line to run the command to retrieve the value. Please try the following code:Dim DeviceCount As Integer = 0With MediaCy.Automation.Capture.GetDeviceCount(Nothing)
.Run()DeviceCount = .Output.ValueEnd With0
Answers
Yuri
I include all of the capture's reference and test command.
But I can't find the suitable command.
Automation command in Project Workbench. I see the 'GetDeviceCount' and 'GetDeviceObject'.
In my Add-in project. The following are the capture item that I can use.
Once the automation reference is available, you should see all of the capture commands as in project workbench.
Example:
Thanks for your help!
I found out where is difference in automation.dll.
My reference path was old version of the dll.
I have another question.
I using QImaging Camrea. Then i tested command GetDeviceCount and got .Output.value =0.
It did not return the correct count.
Is there any other way to get device count or get device list ?
The following are my test results:
Sample Code: