LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Naming results file programmatically

Solved!
Go to solution

Hello,

 

    I'm working on a test setup where the user enters data about the UUT they're about to test. Stuff like model number, serial number, tester name, and whether the test is an initial test or final test. I'd like all this data to automatically be used to create the output file name.

 

Something like: S16-10_SN1234_Mike_Initial Test

 

What's the easiest way to do this?

 

Thanks,

Jay

 

0 Kudos
Message 1 of 5
(1,395 Views)

Use Format Into String to build a file name with all of your parameters.  You can then use Build Path to add that file name to the destination folder path to create a full path for the file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(1,387 Views)

Hi Jay,

 

use FormatIntoString...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(1,384 Views)

@crossrulz wrote:

Use Format Into String to build a file name with all of your parameters.  You can then use Build Path to add that file name to the destination folder path to create a full path for the file.


So I've currently got the user's responses formatted into a string, but how do I add in underscores in the right places?

 

Thanks,

Jay

0 Kudos
Message 4 of 5
(1,381 Views)
Solution
Accepted by topic author JayWW

Here's the actual code I use to generate a report file for you to use as an example.  As far as adding underscores, just put them into your format string.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(1,375 Views)