NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Creat a new directory and assign it to report options

Hello,
 
i want to sort my reports in subdirectories. Therefore i want to creat a new directory during execution and assign it to the report options. Is there a easy possibility to do this (without writing a external function to make the directory) ? What is to correct location inside the sequence and correct parameter for the report path.
 
Thanks for help
 
Simthom
0 Kudos
Message 1 of 4
(2,951 Views)

Simthon,


You have to get a report reference from the current execution and call save on it.

Save Method

Syntax

Report.Save ( pathString, appendIfAlreadyExists, linefeedConversion)

Purpose

Saves the report to the file you specify.

Remarks

Calling this method updates the Location property.

Parameters

pathString As String

[In] Specifies the file in which to save the report.

appendIfAlreadyExists As Boolean

[In] Indicates whether to append or overwrite the file if it already exists. Pass True to append to the file. Pass False to overwrite it.

linefeedConversion As ReportConversion

[In] Specifies a linefeed conversion for the report text.

 

Hope it helps.
Best Regards.

Antonio Lie.

0 Kudos
Message 2 of 4
(2,923 Views)

Hello Antonio,

i know that i can change the report file name like this. But how can i create a new directory out of TestStand ?

For each test run i want to have a directory named with the actual date/time stamp and put all the reports i generate in there (i also have some other logs besides the TestStand standard report). Therfore i have to create a directory on runtime and i have found no function for this til now. I want to avoid to work with external batch files or so.

SimThom

0 Kudos
Message 3 of 4
(2,916 Views)

SimThom,

You can use Engine.CreateTempFile to create a directory.
This method will create a temporary file that will be deleted when TestStand Shuts Down (only the file will be deleted).
If the directory does not exist it will create it for you.
If you do not like this solution you will have to use an external utility to create the directory.

Hope it helps.

Best Regards.

Antonio Lie.

 

Message Edited by Antonio Lie (NI) on 04-05-2006 09:35 AM

0 Kudos
Message 4 of 4
(2,914 Views)