Load data into existing wave

Hi,

I want to load delimited text files which have the same amount of data columns.
I managed to load several files by one function. Each column of a file results in one wave.
But this is not what I need at the moment.

Is there an option to load the data into an existing wave?
e.g. loading the first file creates new waves, data from further files is written to the end of existing waves
This action can be compared with writing data to a data base.

LoadWave command usually overwrites the data if a wave with same name already exists.

Thank you for your answers!
Thank you!

This works fine for numeric waves.

I programmed the LoadWave command to load text columns also.
In the first run text columns are loaded fine.
In the second run information from text columns is lost.


The content of my text waves is lost in this position:

if (WaveExists(wOld))
            Variable oldPoints = numpnts(wOld)
            Variable newPoints = numpnts(wNew)        //content of new text wave still present in "wNew"
            InsertPoints oldPoints, newPoints, wOld
            wOld[oldPoints, oldPoints+newPoints-1] = wNew[p-oldPoints]       //content of new text wave is not transfered to "wOld"
        else


Any idea?
By the way: What means "p-oldPoints"? Where is "p" coming from?



Quote:
The content of my text waves is lost in this position


I have added support for text waves at http://www.igorexchange.com/node/4443

I have not tested the changes. Please post here if it fails.

Quote:
By the way: What means "p-oldPoints"? Where is "p" coming from?


p is a built-in variable that represents the point number of the point in the destination wave that Igor is currently evaluating. For details execute:
DisplayHelpTopic "Waveform Arithmetic and Assignment"


Thank you, now it works perfect!

I had to delete 3 lines:

if (WaveExists(wOld))
            Variable oldPoints = numpnts(wOld)
            Variable newPoints = numpnts(wNew)
            InsertPoints oldPoints, newPoints, wOld
            //Variable oldPoints = numpnts(wOld)                                     --> Double
            //Variable newPoints = numpnts(wNew)                                  --> Double
            //InsertPoints oldPoints, newPoints, wOld                                 --> Double
            if (WaveType(wOld) == 0)        // Text wave?
                Wave/T tNew = $name
                Wave/T tOld = $twin
                tOld[oldPoints, oldPoints+newPoints-1] = tNew[p-oldPoints]
            else
                wOld[oldPoints, oldPoints+newPoints-1] = wNew[p-oldPoints]
            endif
        else
            // Wave does not exist in parent data folder.
            MoveWave wNew, ::           // Move into parent data folder.
        endif


http://www.igorexchange.com/node/3788