11-03-2014 01:18 PM
I need to include PNG pictures into my TestStand Report (HTML, XML, ATML).
When report generation was made through plugins (before TestStand 2012), it was easy to get report file location during execution through variable RunState.Root.Locals.ReportFilePath in order to save PNG files near the report file (in same directory).
I didn't find yet an easy an simple way to do the same in TestStand 2012 with Result Processing Plugins.
Any idea ?
Remarks :
Jean-Louis SCHRICKE
├ CTA - Certified TestStand Architect (2008 - 2022)
├ CTD - Certified TestStand Developer (2004 & 2007)
└ CLD - Certified LabVIEW Developer (2003 & 2005)
11-03-2014 02:41 PM
RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.Options.Directory
Basically because everything is in plugins now you need to go through the plugin configuration property.
Hope this helps,
11-03-2014 02:44 PM
You should be careful using this as some plugins don't have this subproperty defined. You can use the PropertyExists function in those cases.
Regards,
11-04-2014 02:04 AM
jiggawax,
Thank you for you quick answer.
RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.Options.Directory is valid only if
RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.Options.DirectoryType is set to "SpecificDirectory".
It seems that I cannot get the complete ReportFilePath before "UUT Done" plugin entry which is after MainSequence execution.
Jean-Louis SCHRICKE
├ CTA - Certified TestStand Architect (2008 - 2022)
├ CTD - Certified TestStand Developer (2004 & 2007)
└ CLD - Certified LabVIEW Developer (2003 & 2005)
11-04-2014 03:57 AM
I investigated further and may be I found a solution to my problem :
The variable i am looking for is :
RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RuntimeVariables.PerSocket[<socket index>].Path
and is calculated at beginning of execution (Model Plugin - UUT Start).
Jean-Louis SCHRICKE
├ CTA - Certified TestStand Architect (2008 - 2022)
├ CTD - Certified TestStand Developer (2004 & 2007)
└ CLD - Certified LabVIEW Developer (2003 & 2005)
11-04-2014 08:16 AM
Glad you found what you wanted. That's great.
Be aware that the plugin index can change depending on which plugins are turned on or off in the result processing dialog. As well, I mentioned before, some plugins do not define that specific variable that you are going for. So you'll have to write some code to account for that.
Regards,
10-16-2018 08:42 AM
Hi all,
I need in a .net code module the report path.
Depending on process model, ModelPluginConfiguration is not located at the same place :
- sequential model : RunState.Root.Locals.ModelPluginConfiguration.Plugins
- Parallel model : RunState.Root.Parameters.ModelPluginConfiguration.Plugins
After that, I take the first plugin which is enable (in "Base.Enabled" property) and I use "PluginSpecific.RuntimeVariables.PerSocket[MySocket].Path
Stop me if I make a mistake. Thanks
02-06-2019 02:59 AM
Still cannot understand your solution.. In which sequence I use statement:
RunState.Root.Locals.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RuntimeVariables.PerSocket[<socket index>].Path
I'm using parallel model.
08-26-2020 11:34 AM - edited 08-26-2020 11:34 AM
My team had better luck with the following path based on Jean-Louis's solution
RunState.Root.Parameters.ModelPluginConfiguration.Plugins[<plugin index>].PluginSpecific.RuntimeVariables.PerSocket[<socket index>].Path