Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Builder AI: How to control VBAI via API C#

Hi Guys,

 

I want to use Vision Builder AI 2023 Q3 to perform vision inspection. My struggle is that I want to control the start/stop/get result from the c# code.

Windows 11 x64

 

I found info about GitHub repo GitHub - ni/vbai-dotnet: Collection of .NET wrapper functions for the Vision Builder AI API. I even managed to compile the example according to readme file.

The problem is that when I try to run the example I get:

System.EntryPointNotFoundException: 'Unable to find an entry point named 'SetExternalCanvasCallback' in DLL 'nivissvc.dll'.'

 

What can I do to make it working? (Windows reinstallation is impossible!)

Is there any other way to control the vbai the way I want?

 

 

0 Kudos
Message 1 of 3
(400 Views)

I've managed to solve the issue. My way:

 

1. Install Vision Builder (my case is version 2023 Q3)  and other components that you are using from NI.

2. Download and compile GitHub - ni/vdm-dotnet: NI Vision Development Module for .NET ( I used .net 4.8)

3. Download GitHub - ni/vbai-dotnet: Collection of .NET wrapper functions for the Vision Builder AI API.

4. Take compiled NationalInstruments.Vision.Common.dll and use it for compiloation of src/vbai.csproj

5. Use both .dll to compile and run for examples/dotNet.API.2015.csproj

6. There are still errors about unmanaged code but at the end example is working. Several times I click continue.

 

I used visual studio 2022.

Download All
0 Kudos
Message 2 of 3
(353 Views)

Does anyone know where can I find VBAI API description?

0 Kudos
Message 3 of 3
(347 Views)