11-23-2011 09:34 AM
Hello,
I am having difficulty extracted data from a table in a dialog box to a global variable in my script.
First I have a global variable declared as
IF Not Iteminfoget("MyVar") Then
Call GlobalDim("MyVar, MyArray(10)")
END IF
and a Table in my user DIalog box called MeasuredTorque(10 rows, 1 cols)
I am trying to copy the data from the MeauredTorque to MyArray
I am keep getting errors when I try the following error "Wrong number of arguments or invalid assignment of properties : "MYARRY" "
when trying to use the following code
MyArray(0) = MeasuredTorque.Cells(1,1).Value
I probably have a syntax error but I cannot find any examples using the help menu or my reference material.
11-24-2011 11:44 PM
Hi smoothdurban,
That is the correct syntax to read a cell value from a regular SUDialog table control and assign it to a 1D array variable. Were you by chance using a SUDialog XTable control instead of the regular SUDialog table control? You should always declare the global variables in the calling VBScript, never in the SUDialog itself-- were you by chance declaring the global variables in the SUDialog?
Brad Turpin
DIAdem Product Support Engineer
National Instruments