LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Delete Properties

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.

Arcale - CLA, CLED, CTD - LabVIEW 2b || !2b
0 Kudos
Message 1 of 23
(2,290 Views)

Hi Nicolas,

 

please see this other thread handling (nearly) the same problem…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 23
(2,270 Views)

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

 

Arcale - CLA, CLED, CTD - LabVIEW 2b || !2b
0 Kudos
Message 3 of 23
(2,254 Views)

@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.

0 Kudos
Message 4 of 23
(2,238 Views)

@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.

Arcale - CLA, CLED, CTD - LabVIEW 2b || !2b
0 Kudos
Message 5 of 23
(2,219 Views)

@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. 

0 Kudos
Message 6 of 23
(2,211 Views)

@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 🙂

Arcale - CLA, CLED, CTD - LabVIEW 2b || !2b
0 Kudos
Message 7 of 23
(2,206 Views)

@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.

0 Kudos
Message 8 of 23
(2,202 Views)

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).

Arcale - CLA, CLED, CTD - LabVIEW 2b || !2b
0 Kudos
Message 9 of 23
(2,198 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 23
(2,195 Views)