10-07-2020 08:40 AM
Hi all,
Does someone has any idea on how to delete a property in a TDMS file (either on a channel / group / file) ? There is no existing primitive VI to do so in LabVIEW. I have randomly tried a few things in the VI enclosed but I have the feeling that the "TDMS Set Properties" works more like a "TDMS Add Properties".
Thank you in advance for your help.
10-07-2020 09:50 AM
10-07-2020 10:20 AM
Hi GerdW,
this will be my plan B but I would like to avoid data copies since it can be problematic with large TDMS files...
Nicolas
10-07-2020 11:56 AM
@Nicolas_Bats wrote:
Hi all,
Does someone has any idea on how to delete a property in a TDMS file (either on a channel / group / file) ? There is no existing primitive VI to do so in LabVIEW. I have randomly tried a few things in the VI enclosed but I have the feeling that the "TDMS Set Properties" works more like a "TDMS Add Properties".
Thank you in advance for your help.
"TDMS Set Properties" works like "TDMS Set Properties." If the property exists then it changes the property value. If the property does not exist then it adds the property and sets the value. It does not have functionality to delete an existing property.
As you are the second person asking about this recently I'm curious as to the use case. I don't believe that I've ever had a time where I needed to delete an existing property.
10-08-2020 03:02 AM
@johntrich1971 a écrit :
"TDMS Set Properties" works like "TDMS Set Properties." If the property exists then it changes the property value. If the property does not exist then it adds the property and sets the value. It does not have functionality to delete an existing property.
What I meant with "I have the feeling that the TDMS Set Properties works more like a TDMS Add Properties" is : when you give the VI an array of properties name and value, a twisted mind like mine ^^ could have think that the set properties would have set the whole bunch of properties replacing the existing properties but removing the other ones not making an union of the two properties sets.
@johntrich1971 a écrit :
As you are the second person asking about this recently I'm curious as to the use case. I don't believe that I've ever had a time where I needed to delete an existing property.
In my case I have a post traitement tool that can analyse TDMS files and make some computations on waveform. Some waveforms are flagged with properties that I want to remove if the tool decide that the flag is innapropriate.
10-08-2020 06:25 AM
@Nicolas_Bats wrote:
@johntrich1971 a écrit :
As you are the second person asking about this recently I'm curious as to the use case. I don't believe that I've ever had a time where I needed to delete an existing property.
In my case I have a post traitement tool that can analyse TDMS files and make some computations on waveform. Some waveforms are flagged with properties that I want to remove if the tool decide that the flag is innapropriate.
You call these properties flags. Why not have the properties always there and make them TRUE or FALSE? This would seem to be a more normal (and easier to use) flag method than checking to see whether or not the value exists.
10-08-2020 07:31 AM
@johntrich1971 a écrit :
You call these properties flags. Why not have the properties always there and make them TRUE or FALSE? This would seem to be a more normal (and easier to use) flag method than checking to see whether or not the value exists.
I could proceed like that but it just do not correspond to what I am trying to achieve and how things are working in my system 🙂
10-08-2020 07:41 AM
@Nicolas_Bats wrote:
@johntrich1971 a écrit :
You call these properties flags. Why not have the properties always there and make them TRUE or FALSE? This would seem to be a more normal (and easier to use) flag method than checking to see whether or not the value exists.
I could proceed like that but it just do not correspond to what I am trying to achieve and how things are working in my system 🙂
Perhaps if you shared your code it would be more practical to help you to achieve what you are trying to achieve.
10-08-2020 08:06 AM
I cannot share the code but I just need to remove a property on a channel / group in a TDMS file (if possible avoiding data copy for performances issues).
10-08-2020 08:14 AM
Hi Nicolas,
as has been said several times before you cannot delete properties, when you don't want to create a copy of your file.
What about setting the properties to a certain value to mark it as "invalid" for your further data processing?