From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Preparation Procedure: Can I rename my files?

I'm trying to make my own DPP (http://www.ni.com/documentation/en/systemlink/latest/preparation/creating-data-preparation-procedure...)

 

I'd like to set the output filename based on some information extracted from the file itself -- For example, converting XYZ.tdms to <MINION_ID>_XYZ.tdms, where <MINION_ID> is embedded in the file as a file property. Is this possible?

Certified LabVIEW Developer
0 Kudos
Message 1 of 3
(2,013 Views)

Hi JKSH,

 

As of TDM Server 2019 (SystemLink TDM 19.5), this is not possible using the built-in file conversion architecture of the Data Preprocessor (Data Preparation module).  There is information in the oContext object in the V&V step which you can use to read out the expected file path and file name, but changing those values of those properties does not currently result in a change in the output location or file name.  You can instead manually convert the file with DataFileSave() and then use the oContext object to register a V&V failure, which will abort the action of the built-in file conversion architecture.  It's clunky, but I've gotten it to work on one of my projects, so I know it's possible.  Hopefully this will get easier in subsequent releases.  I did mention this to R&D about a month ago.

 

Brad Turpin

Senior Technical Support Engineer

National Instruments

0 Kudos
Message 2 of 3
(1,923 Views)

You also can use MoveFile

0 Kudos
Message 3 of 3
(271 Views)