NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ModifyReportHeader from ProcessModel in Teststand 2012

I need to add information to the report header.  I want to do this from the process model because all UUTs will need to put this information in the report and I don't want each client sequence file to use the modifyreportheader callback.  I had this working in 2010 by simply putting my custom report stuff in the sequence inside sequentialModel.seq.  Since report processing doesn't work the same due to the new features in 2012, I'm having trouble finding a solution. 

 

I understand that I could go to NI_ReportGenerator.seq and add my code there.  However, for source control reasons I don't want any customized code to reside under C:\program files.  The "Call Model Plugin - UUT Done" step which contains the actual report gen steps seems to be hard coded to use C:\Program Files (x86)\National Instruments\TestStand 2012\Components\Models\ModelPlugins\NI_ReportGenerator.seq. 

 

I see two solutions, but haven't been successful implementing either.

 

1.  Somehow change the parameter in ModelSupport.seq->"Call Model Plugin - UUT Done" to a custom path for the ReportGenerator.seq.

 

or

 

2. Force Teststand to use the "ModifyReportHeader" sequence that is in SequentialModel.seq instead of using the one in NI_ReportGenerator.seq

 

Thanks,

 

Kevin

0 Kudos
Message 1 of 8
(3,959 Views)

The SequentialModel is also under program files. How are you avoiding the source control issue for it? Are you copying it to \Users\Public\Documents\National Instruments\TestStand 2013\Components\Models\TestStandModels\?

 

You can do the same thing for NI_ReportGenerator.seq. Just copy it to Users\Public\Documents\National Instruments\TestStand 2013\Components\Models\ModelPlugins\.

 

You will need to remove and re-add any existing report generator instances to insert instances that use your copy. Alternatively, you can delete Users\All Users\National Instruments\TestStand 2013\Cfg\ModelPlugins\ResultProcessing.cfg and it will be regenerated to include an instance of your copied plugin.

 

- James

 

0 Kudos
Message 2 of 8
(3,956 Views)

 

Yes.  I have my custom sequentialmodel.seq located in my source control local repository on disk.

 

After running into this problem, I copied the entire C:\Program Files (x86)\National Instruments\TestStand 2012\Components\Models directory to my local repository.  Teststand now executes ModelSupport.seq from my copy, but when it gets to the step shown below it still points to the Program Files.

 

The image below was captured after deleting the ResultsProcessing.cfg file and restarting Teststand.  Which I didn't try until you suggested it.

 

Capture.PNG

0 Kudos
Message 3 of 8
(3,951 Views)

<message deleted>

0 Kudos
Message 4 of 8
(3,949 Views)

Where is your local repository?

 

Process models can be located anywhere in the search paths. However, your coped plug-in must be under Users\Public\Documents\National Instruments\TestStand 2013\Components\Models\ModelPlugins\.

 

Otherwise the copy will not be found when the ResultProcessing.cfg file is created or when the Result Processing Dialog drops down the list of available plugins. Since your copy is not found in the expected location, it uses the original from Program Files.

0 Kudos
Message 5 of 8
(3,945 Views)

BOO---HISS

 

Well that does explain the problem.  How about option number two in my original post?

0 Kudos
Message 6 of 8
(3,943 Views)

The callback in SequenceModel is only there so it shows up when adding callbacks to a client file while editing. The NI_ReportGenerator.seq file calls its own version of the callback. You could modify NI_ReportGenerator.seq to explicitly call the SequentialModel.... but modifying that file is what you are trying to avoid, so that isn't helpful.

 

You could try editing ResultProcessing.cfg and replace any occurrence of  NI_ReportGenerator.seq with the relative path from Users\Public\Documents\National Instruments\TestStand 2013\Components\Models\ModelPlugins\ to whereever you want it relocated.   For example, something like ..\..\..\..\MyFolderUnderAllUsers\NI_ReportGenerator.seq

0 Kudos
Message 7 of 8
(3,939 Views)

Other possibilities include using a script/sequence/batch file that copies the plugin file to where it needs to be, or use whatever workspace remapping options your source control system offers to remap the file's location on your local machine.

0 Kudos
Message 8 of 8
(3,937 Views)