Import ASCII

Use the Database > Import > ASCII menu option (geogxnet.dll(Geosoft.GX.Database.ImportFile;RunForAscii)*) to import ASCII data files into the current database or a new database.

Import ASCII dialog options

Database

The current database is selected by default. Use the drop-down to select another database from your current project or click the [Create Database] button to create a new database. You can also type in a database name, and if the file does not exist in your current project folder, a new database will be created with that name and the default database creation settings.

  • When no databases are present in Project Explorer, the drop-down is not available.
  • [Create Database]

    Select this button to create a new database to import the file(s) into. In the New Database dialog, specify the name and the size of the database you wish to create and click OK to return to the main dialog.

    File(s) to import

    Select the ASCII file(s) to import. The files should contain your data in either a fixed or free-format row/column format. Each row of data represents a specific sample, and each column represents a particular data field for that sample.

    You can import multiple ASCII files by clicking on the Browse button and holding the control key down while selecting the files. All files must be supplied in the same format. Each ASCII file will be imported into a separate line in the database.

    Script Parameter: IMPASC.FILE

    Template

    Select the import template file (.i3 assumed) or click the Create Template button to create a template. You can also leave this field blank, and the Data Import Wizard will open automatically.

    Script Parameter: IMPASC.TEMPLATE

    [Create Template]

    Click this button to display the Data Import Wizard, which enables you to select your import parameters and create an import template file (*.i3).

  • See the Application Notes below for more information on the import template file.
  • Import mode

    Select one of the following import options:

    Replace: if a line number already exists in the database, and the same line number is encountered upon import, the existing line/channels in the database are replaced with the imported data.

    Append: if a line number already exists in the database, and the same line number is encountered upon import, the version of the imported line is incremented by 1, and the existing line remains untouched. This is the default mode.

    Script Parameter: IMPASC.MODE

    Application Notes

    If the "Specify coordinate system on import" setting is set to "Yes" in the General Settings, and if no coordinate system is defined in the current X and Y channels, the "Georeference Database Channels" dialog is called so that the projection can be set on the X and Y.

    If you do not have an import template, you can create one by selecting the Create Template button and use the sequence of dialogs in the Data Import Wizard to specify how the data in the file is formatted:. The template is a text file with the extension (*.i3) that can be edited in a text editor. The "imparc.i3" file, which can be found in the Geosoft folder (C:\Program Files\Geosoft\Desktop Applications \etc), is a blank self-documented template that can be used to create your own templates and as a reference for the contents and structure of a template.
    Check the ASCII (I3) Import Template File for a description of the template file format and parameters.

    Multiple ASCII Files Import

    When importing multiple ASCII files, the files must have identical formatting. Each ASCII file will be imported into a separate line in the database.

    If an existing template is not specified, the first selected file is used to generate one. If the other files being imported do not have the same number of fields, they have different header content or conflicting data types, the import may still go through. However, the output database may have misaligned and /or dummy channels. Always check the Import Log file for such potential problems.

    If the ASCII files contain a header that includes a row with the channel names, all the files must have the same channel names (i.e., the template FileHeader is 1 or greater). If your ASCII files do not contain a file header, review the template to ensure the FileHeader value is set to zero(0).

    If the line numbers are duplicated, or a line number channel is not specified, an incremental version number will be added to the duplicated line.

    *The GX tool will search in the "...\Geosoft\Desktop Applications \gx" folder. The GX.Net tools, however, are embedded in the geogxnet.dll located in the "...\Geosoft\Desktop Applications \bin" folder. If running this GX interactively, bypassing the menu, first change the folder to point to the "bin" folder, then supply the GX.Net tool in the specified format.