Re: replace 1 col from 2D array problem (further question?)



detech wrote:

It is strang I can not append to 16th col, possibly there is an array size issue. I tried hard but, my brain is dead now, please help?


You are not appending, you are replacing array elements. Your array only has 16 columns (0..15), thus there is nothing to replace in column 16. You need to grow the array by one column to operate on colum 16.
I would suggest you rattle through the rows using autoindexing, search for a match, then add the desired element, building an new output array. It is not very efficient to rewrite the entire array at each iteration with a property node!
Note also that your compare string will never match, because your date has "\" instead of "/" as separator and your NMC must be upper case. Several of your fields also contain spaces (e.g. "TPNo" and "To"), thus you need to trim the whitespace before building the compare string or nothing will ever match.
Attached is one possible solution (LV7.1), modify as needed. (Don't rewrite the original array, or it will grow by one every time you run it!)


ReplaceOneColFrom2DArrayMOD.vi:
http://forums.ni.com/attachments/ni/170/134117/1/ReplaceOneColFrom2DArrayMOD.vi
.



Relevant Pages

  • Re: Psycho question
    ... is) - if I can just "accelerate" a few Python routines that'll ... you may have to rewrite your routines for max speed. ... array of bytes, modifying them. ... module first to convert a string or a list to an array, ...
    (comp.lang.python)
  • Re: Is my Control a cotrol array ??
    ... What happens if you store data for years from ... If I needed to change every second year it wouldn't be a fixed array. ... way people could move their code forward and then rewrite as needed to gain ... lines of working code because when I'm done it will be faster is simply ...
    (microsoft.public.vb.controls)
  • Re: Warning from ring buffer code (Was: Re: linux-next: tip tree build warning)
    ... For the kernel using variable array size is consider bad. ... is very easy to overflow the stack without realizing it. ... The ring buffer (and ... Well actually I would like to rewrite all that entirely to avoid ...
    (Linux-Kernel)
  • Re: How do I reference an array stoerd in a hash?
    ... Jürgen Exner wrote: ... How do I rewrite ... the below to print back all values in the array? ... entropy and ...
    (comp.lang.perl.misc)
  • Re: Is my Control a cotrol array ??
    ... Why would it be a fixed array anyway? ... So the technique is becoming dependant on the data? ... way people could move their code forward and then rewrite as needed to ... lines of working code because when I'm done it will be faster is simply ...
    (microsoft.public.vb.controls)