From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-09-2015 10:49 AM
Hello There,
I ve,
Current File name = Test1.tdms
which has Properties such as :
1. Lab = 123
2. Load = Heavy
3. Machine = 5
4.Method = Fast
5.Run = 2
my required New File name = concatenate of specified root properties spaced with underscore followed by the extension.tdms
i.e
New File name = concatenate [Data.Root.Properties("Lab"),Data.Root.Properties("Load"),Data.Root.Properties("Machine"),Data.Root.Properties("Method"),Data.Root.Properties("Run")] each property seperated by "_"
New File name = 123_Heavy_5_Fast_2.tdms
I need to perform this for multiple tdms files.
I ve attached a sample file
Please guide me thru this scripting process
04-10-2015 11:42 AM
Hello rarun,
Regards,
Samuel S.
Applications Engineer
National Instruments
04-13-2015 10:29 AM
Thanks Sam,
This is how I approached it, let me know if you have any better way to do it. (refer attachement Test1.tdms from previous post)
dim a,b,c,d,e, newname
a=Data.Root.Properties("Lab").Value
b=Data.Root.Properties("Load").Value
c=Data.Root.Properties("Machine").Value
d=Data.Root.Properties("Method").Value
e=Data.Root.Properties("Run").Value
newname=a+"_"+b+"_"+c+"_"+d+"_"+e
Call DataFileSave(newname,"TDMS")
Ques 1 : When I use 'DataFileRename' it provides this error ---- > Operating system error :"-2"
Ques2 : I would like to keep certain length of my current file name and replace the rest with customized name
eg: current name = LR1634240_U4_Double_Loop_12_C_150331_154739.tdms
newname = newname + _150331_154739.tdms
The first part of the name is customized based on the above aproach
The value of second part after '+' is unique to the file but the format of the second part is common for all other files.
How to perform this action.
Thanks
Arun
04-14-2015 08:18 AM
Regards,
Sam S.
Applications Engineer
National Instruments
(866) 275-6964