Archived:.NET API Multiple Images From VBAI Inspection

Updated Jan 4, 2019

National Instruments does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In


  • Vision Builder for Automated Inspection

Issue Details

I am using the .NET API to grab multiple images from my VBAI inspection profile.  In my VBAI inspection profile I have a number of image variables and set them to the images I want to access via .NET.  Every time I get a new inspection image, it overwrites the old image. I don't want it to overwrite, I want to grab 3 different images with the provided ImageGUID.


Currently there is just a single image created behind the scenes for each dotNET VBAI engine created.  Attached is a modified DLL that includes a new GetInspectionImage() function that allows you to pass in your own image. 

Now you can create multiple images:
VisionImage image1 = new VisionImage(); 
VisionImage image2 = new VisionImage(); 
VisionImage imageN = new VisionImage(); 

The GetInspectionImage() can now be called as follows:
engine.GetInspectionImage(Image1GUID, 1, 1, image1, out newImageAvailable); 
engine.GetInspectionImage(Image2GUID, 1, 1, image2, out newImageAvailable); 
engine.GetInspectionImage(ImageNGUID, 1, 1, imageN, out newImageAvailable);