NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing Search Directories during Post substep execution

I've run into a small difficulty in my elegant solution to the problem I posed in my "Calling IVI/Visa drivers from TestStand" question.

In brief, I have some custom step types where I've defined a Post substep, which uses the DLL Flexible Prototype Adapter to call a bit of code I wrote. The problem is, it's unable to find my DLL while executing the Post substep. The DLL is in the same directory as the sequence file, and I have the "Current sequence file directory" option enabled in Search Directories. The same DLL can be found no problem when it's called as the main module for a step.

It seems as if the current sequence file directory is not being searched when the Engine is executing substeps. I'm having som
e difficulty finding an elegant solution to this. I hate to just add another directory to the Search Directories, because those are universal, and this problem is specific to this one sequence. I hate to use a sledgehammer to kill a fly.

Am I missing something obvious? Is there a flyswatter I'm not seeing?
0 Kudos
Message 1 of 4
(3,424 Views)
If your Post substep type is using the DLL Flexible Prototype Adapter, when you select Specify Module and use the Browse button to locate your DLL, there is an option box on the Select DLL window to Use Absolute Path. I�ve run into similar problems where the engine could not locate the DLL�s and this has resolved the problem. Post your sequence file if this doesn�t exterminate your bug.
0 Kudos
Message 2 of 4
(3,424 Views)
No, I can't really do that. Absolute paths suck. In particular, I do my development in a different directory than the test plan will be deployed in. I'd be better off adding the directory to the Search Directories.

I really just want the "Current sequence file directory" option in the Search Directories to work right.
Message 3 of 4
(3,424 Views)
To McGregorMortis -
A substep is a subcomponent of a step type. Step types definitions can reside in a type palette file or any sequence file. When a sequence file uses an instance of a step type, i.e. a step, the step type definition is attached to the sequence file.

We specifically decided not to use the current sequence file search path for substeps in step types for the following reason:

A step type only loads the substep code module
once, even if more than one sequence file uses
it. So if one sequence file has the code module
for the substep in its directory and another
sequence file has another copy of the code module
that might be a little different, the second code
module would not be used.

Step types ar
e intended to be used as a major component of the TestStand engine. That is why the default TestStand step types are stored in the Components directory and the search directory feature specifies to recursively search the Components directory.

Hope this helps...

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 4
(3,424 Views)