11-26-2019 12:43 AM
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?
12-05-2019 05:02 PM - edited 12-05-2019 05:03 PM
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
11-08-2023 07:33 AM
You also can use MoveFile