Hello Paul
I yust want to make some suggestions ...
As you use compressed data files, I guess you have a dll or exe to compress or uncompress your ascii raw data.
By using the custom filter functionality you would have to create your own c code for handling the import. First uncompress, then read in the ascii file with a previous created custom filter definition file.
I don't know for shure, but it should be possible to call the ascii import filter wizzard (the wizzard dialog for defining the structure of the file) from OriginC (you will be able to call it as a labtalk menu command) so it should be easy to create a custom filter that first uncompresses the file and then calls the pure ascii for input into the wizzard ...
The following code shows a filter function I defined for my project:
(don't care about the REDIRECTION stuff ...)
int ImportSVTxtRangeDataFile(Page &pgTarget, TreeNode &trFilter, LPCSTR lpcszFile, int nFile)
{
// set redirection
int iRedirection = _REDIRECTION_OUTPUT_RESULTLOG("ImportSVTxtRangeDataFile ", true);
int iRet;
// check filter type
if( trFilter.Type.nVal != FILTER_TYPE_USERDEFINED )
return 1; // EXIT
// check existance of pgTarget
if( EXIST_WKS != pgTarget.GetType() )
return 1; // EXIT
Worksheet wks(pgTarget.GetName());
if( !wks.IsValid() )
return 1; // EXIT
// import data
// ----
// here would be one possibility to place the uncompressing code
// ----
// here my own import filter function is called,
// maybe it is more efficient to place the uncompressing code
// within the import-function ...
svTxtData data(lpcszFile); // this is a class I created to capsulate
// our txt data handling
iRet = data.importASCIIFilter(wks); // call the import member function
// Reset Redirection
_REDIRECTION_RESET(iRedirection);
return iRet;
}
Hope that helps a bit ...
Hajo
Feel free to ask for more details
...
-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg
SVDO_Origin1
Edited by - SVDO_Origin1 on 12/09/2003 07:49:43 AM