NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Determine Report Folder at Beginning of Execution

I have a need to store data generated during test to a folder relative to the report folder. In my case I'm using On the Fly reporting and the report file path is determined by expression (Generate Report File Path).

I need a way to get the calculated report file path at the beginning of the execution (either within the process model or the main test sequence).

I see that the report path expression is evaluated early in the execution (in NI_ReportGenerator.seq) but is not directly passed back to the process model. Also, I see that the "proper" way to get this data is by overriding the GetReportFilePath in the main sequence file, however this is only available after the report execution is near completion and too late for me.

 

How can I get this data early in the execution?

 

Thanks.

0 Kudos
Message 1 of 4
(4,207 Views)

Hi Terrence,

 

I don't know if this will be the same for you, but for me, the Report File Path is stored in the RunState variable:

RunState.Root.Locals.ModelPluginConfiguration.Plugins[0].PluginSpecific.RuntimeVariables.PerSocket[0].Path

 

I assume this would vary somewhat depending on your configuration settings, but that might be a good place to start looking. Also note that this returns the entire file path, not just the directory, but it shouuld be easy enought to retrieve the directory from it.

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 2 of 4
(4,182 Views)

I use the Sequence File Call back "Sequence File Load" to execute a VI that extracts the current project folder "C:\MyProject"  and I put that into a StationGlobals Variable. It's not part of the test model. It's included in each of my high level sequences just under "MainSequence" in the Sequences pane. From there I configure the results processing to store the report in a customized report file path determined by expression using the returned FileGlobals value as the root.  I tried using Locals and FileGlobals without success. For some reason the value needs to exist at this high level to work correctly.

 

I hope this helps.

0 Kudos
Message 3 of 4
(4,168 Views)

Hi Steven...

 

Thanks for the suggestion.  Indeed that variables contains the report path in my configuration as well.

 

We're definitely digging into the bowels of the reporting plugin here which makes me hesitant to use this as a solution. That is, it is not a very future proof solutions but it's good to have in my back pocket if no better solution presents itself.

 

Thanks again,

 

-- Terrence

0 Kudos
Message 4 of 4
(4,159 Views)