NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining Module Name for Current Step

I need to obtain the modulue name (dll) that TestStand is using for the currently executing step. What method/property is avalable to obtain this information?"
0 Kudos
Message 1 of 8
(4,488 Views)
Hi Joe

Try this:

tsErrChk(TS_SeqContextGetProperty (seqContextCVI, &errorInfo, TS_SeqContextSequence, CAVT_OBJHANDLE, &sequence));
tsErrChk(TS_SequenceGetStep (sequence, &errorInfo, 2, TS_StepGroup_Main, &step));
//Get the step name
tsErrChk(TS_StepGetProperty (step, &errorInfo, TS_StepName, CAVT_CSTRING, &stepname));

CA_DiscardObjHandle (step);
CA_DiscardObjHandle (sequence);


Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 8
(4,488 Views)
This gets me the step name for the third step in the sequence although, what I'm interested in is obtaining the module name for the currently executing step. This is a property of the step which is entered after selecting "Specify Module" in the "Module Pathname" edit box (See BMP).

If you have any ideas let me know...

Thanks,
Steve
0 Kudos
Message 3 of 8
(4,488 Views)
Since I asked the question.... I guess it's OK to answer it...

To get the module name use "Step.GetDescriptionEx(1)" this will return a string with alot of information, including the module name.
0 Kudos
Message 4 of 8
(4,488 Views)
Great Answer
0 Kudos
Message 5 of 8
(4,488 Views)
The information you are looking for can be obtained from the property Step.TS.SData.ModulePath. This will return the path to the test module being called. Please refer to following knowledgebase for more information: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/5aa3e65a39e6c08886256b29008366fd?OpenDocument.

Hope this helps!
Message 6 of 8
(4,488 Views)
Great!
Just what I was looking for.
0 Kudos
Message 7 of 8
(4,488 Views)
I meant this one.

Just what I was looking for!
0 Kudos
Message 8 of 8
(4,488 Views)