JScript GetArrayVariable()
Foo from Netherlands  [2 posts]
1 year
I try to get the confidence array form the fiducials data in a JScript with the GetArrayVariable() function

I do get data but when I Write() the data or use a WatchVariable component the data is wrong.

fiducialConfidenceArray = GetArrayVariable("FIDUCIAL_CONFIDENCE_ARRAY")
Write(fiducialConfidenceArray + "\n" );    

any tips or is something wrong with the GetArrayVariable() function?
Steven Gentner from United States  [260 posts] 1 year
You may find

fiducialConfidenceArray = GetArrayVariable("FIDUCIAL_CONFIDENCE_ARRAY")
if (fiducialConfidenceArray != null)
    Write(fiducialConfidenceArray[0] + "\n" );    

to be more correct. Note this assumes that you checked the "create array" in the Fiducials module and that you just wanted to print out the first element[0] of the array.

Note the use of SetArrayVariable instead of SetVariable.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index