02-25-2008 07:12 AM
Parameters.Result.ReportText,
02-25-2008 08:29 AM
Hi,
All you have top do is in the Post Expression of the Step Properties is pass that ReportText value to the Parameters.Result.ReportText.
eg
Parameters.Result.ReportText = Step.Result.ReportText.
Regards
Ray Farmer
02-25-2008 09:34 AM
Ok, but I'd like to reuse the comment that I've already written in Comment section. Is it possible to recover the Comment without rewrite it in a post condition?
02-25-2008 02:37 PM
Hi,
Forgive me but I may be missing something here!
You have a comment in Step.Result.ReportText and you what it to appear some where else via Parameters.Result.ReportText or maybe you want it at a different location and not bothed about it being in the Step results. It which case instead of specify the Step.Result.ReportText then write it direct to Parameters.Result.ReportText.
But if you do want it both places then you are going to have to perform some extra task. That extra task could be performing the Post Expression or create a custom step type that already does that Post expression built in.
Regards
Ray Farmer
02-25-2008 02:47 PM
02-25-2008 02:51 PM
Coma,
Maybe you can post a small example showing what you are trying to achive.
Regards
Ray Farmer
02-26-2008 01:49 AM
First of all, thanks to all...now I try to explain what I want to to.
1. In TestStand 4, in the Main Sequence, I insert a Pass/fail test.
2. In the Module Panel of Pass/fail test I link the dll and the test that I wrote in CVI
3. In Properties Panel of Pass/Fail test (in General Option) I insert a comment in the Comment Box
This is the scenario.
Now, I execute a Single Pass, and TestStand gives me a report in HTML format. I'd like that near the Step Name, appears also the comment that I wrote previously in Comment Box.
Best regard
Corma
02-27-2008 05:43 AM
Hi Corma,
You can access and change the comment of a step programmatically using his PropertyObjectReference.
Namely in TS 4 the post-expression
Locals.ClonedComment = Step.AsPropertyObject.Comment
copies the comment of the actual step ( post-expression ) to a local variable named ClonedComment.
My message is use "Step.AsPropertyObject.Comment" and you should be able to programmatically control the Step comment as you prefer.
Best Regards
02-27-2008 05:44 AM
02-27-2008 06:42 AM
Ok, but in which way I can recall the local variables (Locals.ClonedComment) used in your file, in reportgen_html.seq ?
If I start a single pass, the comment is not displayed....sorry, but I used TS4 only from 2 week, and i'm not very skilled.... 😞