Page 761 - ExtendSim User Guide
P. 761

Data Management and Exchange 735
User interfaces for data exchange
ExtendSim provides the following methods to import or export data:
1) TheFilemenuhasImportDataandExportDatacommandsforexchangingdatausingtext files, as shown in the example that follows.
2) TheDataImportExportblock(Valuelibrary)enablesExtendSimdatabasesorglobal arrays to directly import data from or export data to spreadsheets, external databases, or an FTP site. Use of this block is described in detail on page 781.
3) ReadandWriteblocks(Valuelibrary)canimportorexporttextfiles,ExtendSimdatabase tables, global arrays, or Excel worksheets as a local copy. See “Read and Write blocks” on page 773.
4) YoucanuseDatabasemenucommandsto:
• Create a new, or replace an existing ExtendSim database from an imported database text file. The text file can be generated by a different ExtendSim database or by an SDI Industry database.
• ExportanentireExtendSimdatabaseasatextfile.Thefilecanbeimportedintoadif- ferent ExtendSim database in the same model or in a different model
• Import tables from an ExtendSim or SDI Industry database as text files to an Extend- Sim database.
• Export tables as text files from an ExtendSim database to a different ExtendSim data- base.
5) Among other capabilities, the ExtendSim DB Add-In for Excel works with database text files to transfer data between an ExtendSim database and Microsoft Excel. It is described fully starting on page 760.
How to import data using the File menu
The example that follows uses a menu command to import a text file of data into the Reservoir model that was discussed in the Tutorial module. The imported data will be used as the monthly rainfall values. The steps are:
Open the model and save it under a different name:
Open the Reservoir 1 model located in the folder \Examples\Tutorials.
So that you don’t overwrite the original file, save the model as Reservoir Import.
To import data into the data table:
In the Lookup Table block, click in the title field of the data table column labeled Rain
(inches); this selects that entire column.
☞ You must select the table column(s) to enable the Import Data or Export Data menu commands. Give the command File > Import Data.
For Windows, choose Files of type: Text File as the type of file to open.
Find and open the “Rainfall.txt” file, located in the folder \Examples\How To.
How To

   759   760   761   762   763