03-24-2013 08:08 AM
Hi :
I want to delete element from array that contain word " Default:" , I have succedd to delete one one element but I don't know what I am doing
wrong with my vi
attach see file plesae
thanks
Wisam
03-24-2013 10:18 AM - edited 03-24-2013 10:22 AM
You want to use replace array subset so you can reuse the buffer. If the item does NOT have the word default in it, you put it back in the array. If it does, you don't. The other case is 0.. The case shown is called Default, but has nothing to do with the word default you're searching for so don't be confused. That is what LabVIEW names the case to show it will handle any case which you have not defined within the default case. Then you trim the array at the end. This reuses the existing buffer. Keep a counter for the number of elements you've added back into the array so you know how much to trim and at what location to insert an element. If you have LabVIEW 2012, look into conditional indexing. But, this is not as memory efficient because it does not reuse the buffer (yet). But I think NI has or will be changing this slight oversite.