NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Adapter, SafeArray parameter

HI,
 
I want to call the Engine.DisplayFileDialog Method directly with ActiveX Adapter in TestStand but I encounter problems with parameter selectedPaths define As SAFEARRAY(BSTR) Type :
 
=> TS Error
Details: An error occurred calling 'DisplayFileDialog' in 'IEngine' of 'NI TestStand API 3.0'
Invalid argument. Expected SAFEARRAY of BSTR.
Source: TSAPI
Error Code -17308; Specified value does not have the expected type.
 
What is the best and easiest way to pass a TestStand variable compatible with SafeArray format ?
 
Thanks in advanced,
 
     Emmanuel
0 Kudos
Message 1 of 2
(2,808 Views)
Emmanuel,
 
You should use a string array property for the selectedPaths and absolutePaths parameters.
These paramters are output parameters:

selectedPaths As String Array

[Out] Returns the array of pathnames of the files or directories that the user selected. The pathnames may be relative or absolute depending on the dialog box settings.

absolutePaths As String Array

[Out] Returns the array of absolute pathnames of the files or directories that the user selected.

I am attaching a TestStand 3.0 Sequencee File that uses the ActiveX adapter to call Engine.DisplayFileDialog.

Hope it helps.

If you have any question let me know.

Antonio Lie

Message 2 of 2
(2,790 Views)