NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand API/LabWindows CVI Get Step Names/Descriptions

Hi,

 

I'm trying get each of the step names and descriptions in a sequence file from a cvi dll.

 

//this works 
tsErrChk(TS_PropertyGetPropertyObject (sequence, &errorInfo,"RunState.Sequence.Setup", 0, &setupSequence));
	tsErrChk(TS_PropertyGetProperty (setupSequence, &errorInfo, TS_PropertyName, CAVT_CSTRING, &setupName));

//this gives me an error
tsErrChk (TS_PropertyGetValString(sequence, &errorInfo, 
                                       "RunState.Sequence.GetStep(1,0).Name", 
                                       0, &setupName));
	
	tsErrChk (TS_PropertyGetValString(sequence, &errorInfo, 
                                       "RunState.Sequence.GetStep(1,0).GetDescriptionEx()", 
                                       0, &setupDescription));

 

 

I get this error at runitme

 

Unknown variable or property name 'GetStep(1,0)'.
Error accessing item 'RunState.Sequence.GetStep(1,0).Name'.

-17306; Unknown variable or property name.

 

Are the individual step names available in the API using the 'GetStep(x,x).Name' and GetDesc() functions?

 

Thanks

 

Curt

0 Kudos
Message 1 of 2
(3,158 Views)

Sequence.GetStep(1,0) is getting the second step in the Setup for the sequence you're trying to get names of.  My guess is that the step doesn't exist or something is wrong with the step.

 

In general, it looks like your code should work.  My code looks roughly like:

SequenceFile.GetSequenceByName("MainSequence").GetStep(x,StepGroup).Name

and this is in a for loop with the result of Sequence.GetNumSteps(StepGroup)

 

Here's a picture of my LabVIEW code, which I assume you could use as a guide in CVI.

get step names.PNG

 

Pulido Technologies LLC

 

 

0 Kudos
Message 2 of 2
(3,141 Views)