06-12-2017 01:26 PM
I am using the .NET api to grab multiple images from my VBAI inspection profile.
In my VBAI inspection profile I have set 3 image variables and set them to the images I want to access in C# .NET.
Using the method
CapturedImage1 = engine.GetInspectionImage(Image1GUID, 1, 1, out newImageAvailable);
Where Image1GUID is the variable name I set. That works but when I tried to grab the next image CapturedImage2 = engine.GetInspectionImage(Image2GUID, 1, 1, out newImageAvailable);
it overwrites CapturedImage1 and now it seems like they are just pointing to the same image reference.
How do I grab multiple images without overwriting the old image so I can display 3 different images?
Solved! Go to Solution.
06-12-2017 02:36 PM
Currently there is just a single image created behind the scenes for each dotNET VBAI engine created. I just modified the dll to include a new GetInspectionImage function that allows you to pass in your own image. Now you can have:
(Call this once when app starts)
VisionImage image1 = new VisionImage();
VisionImage image2 = new VisionImage();
...
(call this to get the images from inspection)
engine.GetInspectionImage(Image1GUID, 1, 1, image1, out newImageAvailable);
engine.GetInspectionImage(Image2GUID, 1, 1, image2, out newImageAvailable);
Hope this helps,
Brad
06-20-2017 09:19 AM
That worked!