NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Editing sequence parameters

Hello All,
 
I am writing an application (C#) that read all the sequences in a sequence file.
 
1) For each sequence that is selected I want to display its parameters. I use the Sequence.Properties to get the PropertyObject for its properties. But to get a list of all the properties that only way I could do it was PropertyObject.GetXML. Is there any other way to get a list of all the parameters (name,type,value,flags)?
 
2) After this I was thinking of creating a dialog box for the user to enter the value for each parameter. I was wondering if there is already a standard dialog box available like in the TestStand app with which the user can enter the needed parameter values in the TS API?
 
3) Finally for the chosen sequence, I will call it from another temporary sequence. Basically my application allows the user to build a sequence from available sequences.
 
Thanks in advance for any help...
 
Sriharsha
0 Kudos
Message 1 of 6
(3,695 Views)
Hi Sriharsha,

Since all of the properties of a particular PropertyObject are ALSO PropertyObjects, you can use functions like GetNumSubProperties in conjunction with the GetPropertyObject function. Combining a For loop as well as all of the other methods and properties of the PropertyObject class should get your desired results.

As for your second question, there really is no built in dialog for setting parameter values that can be used in the sequence. It certainly is possible, however, to create a dialog like that using the TestStand API in your programming language of choice. You can easily display variables as well as their values, and set those values from a code module that could be called in your Temporary sequence.

Hope this helps Sriharsha, let us know if you have any more questions.
Dan Weiland
0 Kudos
Message 2 of 6
(3,672 Views)
Perhaps the Sequence Call Specify Module dialog box would be of use to you? Insert a sequence call step into sequence you generate. To display the module dialog, call Step.SpecifyModule.
0 Kudos
Message 3 of 6
(3,651 Views)
Thank you for the responses.

The problem I noticed with SpecifyModule API is the option that is supported for .NET is "SpecMod_ReadOnly" only, which means I cannot really use it. But I found it easy enough to bring a list of sequences in sequence and present all the parameters in it.

Thanks,
Harsha
0 Kudos
Message 4 of 6
(3,639 Views)
Thank you for the responses.

The problem I noticed with SpecifyModule API is the option that is supported for .NET is "SpecMod_ReadOnly" only, which means I cannot really use it. But I found it easy enough to bring a list of sequences in sequence and present all the parameters in it.

Thanks,
Harsha
0 Kudos
Message 5 of 6
(3,640 Views)

All module types should implicitly support SpecifyModuleOptions.SpecMod_NoOptions.

I can understand how the documentation might be interpreted otherwise.

 

0 Kudos
Message 6 of 6
(3,632 Views)