NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Additional Results Custom Step using Variables in Name and Value to Log expressions?

I am trying to create a Custom Step Type for logging additional results - requiring a single Name and Value data pair included in the step.

 

I want to pass the name and value data in using two specific variables.

 

This functionality can of course be explicitly coded on a test step without problem, but I can't find a way to create a custom test step which inserts such a step i.e. automatically inserting the correct variable names into Name and Value to Log fields.

 

Any ideas how to accomplish this? I don't want the custom step users to have to type in the variable names every time they use it.

 

I am using TestStand 4.1.1

Message Edited by CIM1 on 04-20-2009 07:26 AM
0 Kudos
Message 1 of 3
(3,419 Views)

Hi CIM1,

 

There are a few ways of doing this.

 

The simplest one would be to configure the expression in the Pre-Expression or Post-Expression (depending on whether you would like the Step Type to use the value in the variables or write the value to the variables) and then from here you can lock away the expressions from being edited. The caveat with this method is that you are obviously restricing the Pre/Post-Expressions for the step type. 

 

Another Method would be to code some code modules to Write to/Read from the Variables and then calling these in the Steps Pre-Step SubStep or Post-Step Substep. The advantages of this method would be that you can search for the Variable, and if the variable is not present, you could create it before writing to it.

 

Hope this Helps.

 

Best Regards,

 

Steve H 

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

Hi,

 

Perhaps I didn't explain the issue very well but I was trying to create a custom step type based on an Additional Results Step Type with Name and Value To Log set to specific defined variables which would be assigned values in the step pre-expression. The problem was saving those variable names in the custom step type such that when a new step was created they were automatically put into the Name and Value To Log fields of a single data pair - which I don't think your response solves.

 

We eventually came up with a different solution having failed to find a way to get the above approach to work.

 

Thanks anyway for reply.

0 Kudos
Message 3 of 3
(3,285 Views)