Exporting and importing entries

You can export DataWindow object definitions to text files. The text files contain all the information that defines the DataWindow objects. The files are virtually identical syntactically to the source forms that are stored in libraries for all objects.

You may want to export object definitions in the following situations:

NoteCaution The primary use of the Export feature is to export source code, not to modify the source. Modifying source in a text file is not recommended.

Later on you can import the files back into DataWindow Designer for storage in a library.

StepsTo export entries to text files:

  1. Select the Library entries you want to export.

  2. Click the Export button.

    or

    Select Entry>Export from the menu bar.

    The Export Library Entry dialog box displays showing the name of the first entry selected for export in the File Name box and the name of the current directory. The current directory is the last directory you selected for saving exported entries or saving a file using the file editor.

    DataWindow Designer appends the file extension .srd.

  3. Specify the filename and directory for the export file. Do not change the file extension.

  4. Specify the encoding type you want the file to use.

  5. Click OK.

    DataWindow Designer converts the entry to the requested file format, stores it with the specified name, then displays the next entry you selected for export.

    If a file already exists with the same name, DataWindow Designer displays a message asking whether you want to replace the file. If you say no, you can change the name of the file and then export it, skip the file, or cancel the export of the current file and any selected files that have not been exported.

  6. Repeat steps 3 and 4 until you have processed all the selected entries.

NoteYou cannot see export files in the Library painter Since export files are text files, the Library painter does not show them; it shows only libraries and directories.

StepsTo import text files to library entries:

  1. Click the Import button.

    or

    Select Entry>Import from the menu bar.

    The Select Import Files dialog box displays showing the current directory and a list of files with the extension srd in that directory.

  2. Select the files you want to import. Use Shift+Click or Ctrl+Click to select multiple files.

  3. Click Open.

    The Import File Into Library Entry dialog box displays listing the libraries in the library search path.

  4. Select the library you want to import the text files to.

  5. Click OK.

    DataWindow Designer converts the specified text files to DataWindow Designer format, regenerates (recompiles) the objects, stores the entries in the specified library, and updates the entries' timestamps.

    If a library entry with the same name already exists, DataWindow Designer replaces it with the imported entry.

    NoteCaution When you import an entry with the same name as an existing entry, the old entry is deleted before the import takes place. If an import fails, the old object will already be deleted.