Hi,
 
I am trying to create an global object in Vision Builder with the getobjects function. Unfortunately, I couldn't realize it.
I have the following task.
I want to start Vision Builder by a V.Basic script.
 
Dim NIVBAIInspecEngine As New NIVBAIInspectionEngine
Dim NIVBAITarget1 As NIVBAITarget
'set IP of target and the version of VBAI
Set NIVBAITarget1 = NIVBAIInspecEngine.ConnectToTarget2("127.0.0.1", vbaiFullControl, vbaiLatestAvailableVersion)
 
This works fine.
 
Now I want to start in another script the inspection with
 
'open inspection
 Set Inspection = NIVBAITarget2.OpenInspection (f_Path)
 
and start it.
 
I want to use several Inspections in several scripts.
 
At the end I want to disconnect from my target.
 
 'disconnect from target
 NIVBAITarget2.Disconnect
 
Everything is working fine as long I am in the same script. I can't separate the script :-(.
How can I solve this?
I tried it to make an global object, but I wasn't successful.
 
Thanks