Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

for programming using Visual basic and VBAI 3

Hi:
I was writing a program using visual basic and VBAI 3.0 and i wished to display the results of a step in the inspection and i wrote this statment:
Text1.Text = NIVBAITarget1.ActiveInspection.States(index1).steps(ind).Result.Report, but it gave me an error.
 
'index1' is the index that determines which state and 'ind' is also an index that determines which step.
 
please tell me where is the error and how i can use NIVBAIStepResults and NIVBAIStepMeasurements to display results and measurements in textboxes in my application.
 
Thanks alot in advance.
0 Kudos
Message 1 of 2
(3,160 Views)

Noha,

    What error was it giving you?  Knowing the error details makes it easier to track down what the discrepancy is.  Also, it sounds like the issue may be related to data types.  I believe the text box takes a string where as the Report that VBAI returns for certain step results is often in other formats, such as spreadsheets or other sets of data.  What steps do you have and have you tried to determine the data type of the VBAI Report based on the types of results your steps return?  Let me know what you think and what the error said.  Thank you!

-Allison S.
Calibration Services
Product Support Engineer
0 Kudos
Message 2 of 2
(3,135 Views)