02-03-2009 11:31 PM
I want to change the step label progrmatically based on the string variable in the step specified.
Ex: If a step contains a variable "Local.name",(names: TOM, MAT). When ever we change the name from 'tom' to 'mat' the corresponding name should be displayed in the label in the result.
02-04-2009 01:05 AM
Hi,
If its inside the step then use Step.Name. If it's the next step then use NextStep.Name and if its the previous step then use PreviousStep.Name.
If its outside the step but not the next or previous, then use PropertyObject.Name. To use this first you will need to obtain a PropertyObject reference of the required Step.
For more information regarding these API property methods, checkout the TestStand Programmer help.
Regards
Ray Farmer
02-04-2009 01:25 AM
02-04-2009 01:26 AM
02-04-2009 02:34 AM
Hi,
Actually I have just remembered. You can not change the Step Name (Label) in the Step and have it affect the result if only called once. You have to change the value before you call the Step in question. So if you had an expression in the previous step such as NextStep.Name = "Test 1" this would change Action to Test 1 and therefore this would get recorded in the report.
Using an expression in the Action step such as Step.Name = "Test 1" would not change the Label but if it is in a loop you would notice that the next iteration of the step would change the Label.
Regards
Ray Farmer
02-04-2009 03:43 AM
Hi,
A correction to my last response.
Using the API call Step.Name in the pre-expression will change the Name of the step and the change will be seen in the report
eg Step.Name = "Do some task" will change "Action" to "Do some task".
Sorry for any confusion.
Regards
Ray Farmer
02-04-2009 08:37 AM
02-05-2009 05:34 AM
hi i see a problem with your solution when this preexpression is kept for the step in the type palette.
Initially i was trying to include the preexpression in the sequence which worked fine by the solution provided but when the same expression kept in type palettes the name get displayed for the step after it i.e, it gets effect for the next step.
02-06-2009 04:58 AM
hi i see a problem with your solution when this preexpression is kept for the step in the type palette. Initially i was trying to include the preexpression in the sequence which worked fine by the solution provided but when the same expression kept in type palettes the name get displayed for the step after it i.e, it gets effect for the next step. |
02-09-2009 06:10 AM
Hi,
Can you post a picture highlighting the problem.
Regards
Ray Farmer