NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

RunState.Caller.Locals.ReportOptions.Directory unknown in Teststand 2013

Hello,

I have a problem due to migration between TestStand 4.1.2 and TestStand 2013.

In previous sequences I used the variables: RunState.Caller.Locals.ReportOptions.Directory, RunState.Caller.Locals.StartDate.Text, RunState.Caller.Locals.UUT.SerialNumber, RunState.Caller.Locals.ReportFilePath and others... without problem.

Now in TestStand 2013, the variables cannot be evaluated , generates an Teststand error and thus I cannot personnalize my report name and directory.

 

Hereafter the complete expression that cause problems:

RunState.Caller.Locals.ReportOptions.Directory=FileGlobals.Report_Directory + "\\" + RunState.Caller.Locals.StartDate.Text + "\\" + RunState.Caller.Locals.UUT.SerialNumber ,
RunState.Caller.Locals.ReportFilePath=FileGlobals.Report_Directory + "\\" + RunState.Caller.Locals.StartDate.Text + "\\" + RunState.Caller.Locals.UUT.SerialNumber + "\\" + "Report ["+ RunState.Caller.Locals.UUT.SerialNumber +"][" + Str(RunState.Caller.Locals.StartTime.Hours) +" "+ Str(RunState.Caller.Locals.StartTime.Minutes) +" "+ Str(RunState.Caller.Locals.StartTime.Seconds) + "]" + ".html",
FileGlobals.UUT_Time = "[" + RunState.Caller.Locals.UUT.SerialNumber+"][" + Str(RunState.Caller.Locals.StartTime.Hours) +" "+ Str(RunState.Caller.Locals.StartTime.Minutes) +" "+ Str(RunState.Caller.Locals.StartTime.Seconds) + "]" , FileGlobals.fileDir=RunState.Caller.Locals.ReportOptions.Directory 

 

Thanks for your help.

Message 1 of 5
(5,091 Views)

If you using these expressions to set the report path and directory, then, do consider using TestStand expression to specify the report path in Report Options dialog. Its lot easier to use compared to setting values to subproperties of Runstate.Caller.Locals.ReportOptions variable.

 

You can get more information in the following links

http://zone.ni.com/reference/en-XX/help/370052K-01/tsref/infotopics/specifyreportfilepath_byexpressi...

http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/reports_expressions/

http://digital.ni.com/public.nsf/allkb/78E88742D0F8C3C5862576D4006B8E44

 

Coming to your error, please provide more information regarding which sequence file and sequence did you modify.

 

Also note that, in TestStand 2012, process models had major change to support plug-in architecture. Process models without the plug-in architecture (like the one used in TestStand 4.1.2) is installed in "<TestStand>\Components\Models\TestStandModels\TestStand 2010 Process Models (Legacy)" directory. If you want to migrate your process model changes, it might be valid to update the legacy process models instead of new models.

 

You can see brief description of TestStand 2012 process model changes in http://zone.ni.com/reference/en-XX/help/370052K-01/tshelp/infotopics/2012whatsnew/#plugin

 

- Shashidhar

 

0 Kudos
Message 2 of 5
(5,080 Views)

First of all, I thank you for all the informations.

I think that my troubles come from the process model changes and I would prefer using the new one.

With all the report options dialog box, I will define the correct name and directory for my reports.

But, I also use another function in my sequences to insert some graphs (*.png), and this function uses the report file name and directory...and also a timestamp to differentiate all the names of my graphs because several reports (and associated graphs) may be in the same directory.

So, now my question is how to find (in my sequence) the report file name and report file directory. It seems that the macro used in the report dialog box cannot be used in the sequence... I think some functions exist to find these informations but I don't know them.

Ideally, this is how I would like to name my graphs: graph1_09-04-2014_08-59-00.png and I need to save this file in the same directory than report file.

Thanks in advance

0 Kudos
Message 3 of 5
(5,062 Views)

You can get the timestamp (UUT Execution start date and time) using TestReport callback. The callback sequence has StartDate and StartTime parameters which you can use to create unique names for your graphs. If you want to use TestReport callback and you dont want to create the report file, you can have a sequence call step in your TestReport callback, that calls into TestReport sequence of "<TestStand>\Components\Models\ModelPlugins\NI_ReportGenerator.seq" file, to create the report.

You can also use GetReportFilePath callback to get the report file path. Report path will be passed to the sequence as parameter and you can use it to get the directory where you can copy all your graphs. You can also use this callback to copy all the required graphs to the report directory.

Your problem of giving unique names for the graphs and copying them to the report directory can be solved using above mentioned callbacks.

- Shashidhar

0 Kudos
Message 4 of 5
(5,051 Views)

Hello,

Thank you for your proposals but I did not succeed to use the callbacks... I usually used the basics of Teststand without using them.

So I don't know where to change the parameters, even if I found the callback Testreport. I have a empty sequence called Testreport but I don't know how to read the path...or to modify it.

So for the moment I have no other choice than using the old teststand process model (2010). And that works, but it is a pity because I cannot generate reports in ATML.

0 Kudos
Message 5 of 5
(4,964 Views)