Copyright 2005 by gINT Software. All rights reserved worldwide.
GRA001.TXT

gINT Rules Code Add-In menus Samples - 001

Requires gINT version 7.1.001 or later.

NOTE:  Code samples are provided free of charge and as-is.  gINT Software makes no claim or warranty as to the accuracy of the samples.  It is the responsibility of the user to ensure that the code performs as it should.  Comments, suggestions, and error reports are appreciated.

Description
===========
Inserts the "GRA001" submenu under the "Add-Ins" menu in Input with the command "Import CPT" under this submenu.  "Import CPT" brings up a file open dialog to allow selection of CPT data files with the extension of "CPD".  On selecting the file or files, the program then:
1. Converts the CPD files into a temporary CSV file that gINT can read.
2. Runs a script to import the data into the current database.
3. The script continues to preview the imported data to a log report.

If the records in the POINT table do not exist for the data being imported, the program automatically adds them.

Revision History
================
02 Apr 2005:
Initial public upload
Was released for Beta distribution and testing 24 Jan 2004
*************************************************

INCLUDED FILES:
GRA001.GLB:
  Add-Ins:  GRA001-ImportCPT

  gINT Rules code modules:
    GRA001                    Main
                              ImportCPT

    GRA001 COMMON PROCEDURES  CPTtoCSVFailedFnB
                              ParseStringFnS
                              PointIDExistsFnB
                              RecordsetClose
                              UniqueFileNameFnS

  Log Reports:  GRA001

GRA001.GPJ:
  Sample project that makes use of the code.

GRA001-1.CPD and GRA001-2.CPD:
  Sample CPT data files for two boreholes.
*************************************************

INSTALLATION PROCEDURE:
Copy the files wherever you prefer.  To see the gINT Rules code modules you must either merge the GLB into your library (Utilities:Lib Merge/Copy) or change to the included library (File:Change Library).
*************************************************

SPECIAL NOTES:
1. The conversion code is specific to one type of CPT data file.  Different manufactures of CPT logging equipment and CPT contractors will supply different file formats.  Also, the program is set up assuming a certain, target database structure.  You will need to modify the code to accommodate your structure, if different, or change the code to accommodate your structure.

2. The supplied project has no data in the POINT or CPT tables.  Running the "Import CPT" command under the Add-Ins:GRA001 menu, select one or both of the supplied CPD files.  This will import the POINT and CPT data and preview the imported results to a log form.

!!!!!!!!!!!!
3. IMPORTANT:  The import process will fail if you have the original library and project files in the same folder.  The program cannot complete the update if both files are in the same folder and with the same name.
!!!!!!!!!!!!
*************************************************