04-16-2014
05:09 PM
- last edited on
11-04-2024
10:41 AM
by
Content Cleaner
So I'm a bit of a rookie at modifying the TestStand process models.
I am using TS2012 with the standard sequntial process model. I would like to print the report for a given UUT at the completion of the test sequence. This would seem to fit right within the concept of the Addon process models. I have seen the follwoing example for performing this task https://forums.ni.com/t5/Example-Code/TestStand-Model-Plug-in-Printing-Reports-and-Generating-PDF/ta... , however, I am not sure how to get the current report name or how to pass this into the addon process model.
04-17-2014 03:14 PM
By "addon process model" I assume you mean that you are using the example stated in your post as a TestStand plugin. If I understand correctly you want to get the report name from the report being printed by the plugin?
04-17-2014
05:41 PM
- last edited on
11-04-2024
10:46 AM
by
Content Cleaner
"By "addon process model" I assume you mean that you are using the example stated in your post as a TestStand plugin. If I understand correctly you want to get the report name from the report being printed by the plugin?"
Not quite from the plugin but to the plugin. For the example to work I have to provide the print report sequence with the report name, path and schema.
So you know where I am at.
I have created a model plugin using the instructions provided here and copied the sequnces from the "Programmatically Print" example provided into the plugin. From here I added a sequence call to the Print Report subsequence in the "Model Plugin - Post UUT" seqeunce. This mostly worked if I hard code the report name, path and schema. I still need to determine and pass these values into the print report sequence.
I've attached the plugin and required librarys for the print report sequence.
Thanks for your help.
04-18-2014 02:55 PM
These are the 3 parameters that we need, now we just need to figure out how to pipe these into the plugin.
Parameters.ReportOptions.BaseName
Parameters.ModelPlugin.Base.RuntimeVariables.AbsolutePath
Parameters.ReportOptions.StylesheetPath
04-19-2014 02:08 AM
So I believe that I have the answer!
As I said before
- I created a model plugin and copied the "Print Report" and "Convert XML report to HTML" sequences into the plugin
- Ensure that the ReportFilePath, StylesheetPath, ReportFormat, PrintOption, and ShowDiaglog are added as variables in the "Print Report" sequence
- I called the "Print Report" sequence from the Model Plugin - Post UUT
- In the Module -> Step Settings pane for the Print report call; I added the following variables
ReportFilePath = RunState.Report.Location
ReportFormat = "XML"
StylesheetPath = RunState.Report.StyleSheetPath
PrintOption = 1
ShowDialog = 1
In the case of the variables they can be found in the Expression Browser->TestStand API tab
04-28-2014 03:27 PM
Thanks for taking the time to write all that out and help future customers that might run into this same problem.