Copy and Paste provides the most simple method for moving data into and out of your models. It is generally the most practical when the exchange of data is a one time event. The operation of these commands is outlined below, followed by a discussion of the necessary formats.
Exporting Data Using Copy: To use copy and paste to export data from your model, you will need to:
Set up a table in the model with the desired variables and format. Run the model (see Chapter 6 for details on defining and formatting tables).
Click on the column header to select the column of data to be exported as illustrated in Figure 8-1 (hold down the shift key to select multiple contiguous columns or the control key [Windows] or command key [Macintosh] to select noncontiguous columns).
|
Figure 8-1 |
Choose Copy from the Edit menu - the data will automatically be stored in the clipboard included in your System.
[Note: If you hold down the alt key (Windows) or option key (Macintosh) when choosing Copy, you will also copy the variable name along with the data in the column.]
Open the document which is to receive the data. Paste the data into the recipient application.
Importing Data using Paste: To use copy and paste to import data into your model, you will need to:
Copy the data set from another application following the appropriate directions. The data will automatically be stored in the clipboard included in your System.
Switch to your model, open the variable dialog which is to receive the data.
Select all pre-existing data that is to be replaced by the pasted set.
Use the key commands control V (Windows) or command V (Macintosh) to deposit the data. On Windows, if the data is coming from an application that supports DDE, a secondary Paste Special dialog will appear. Choose Paste and click OK. [Note: Copy and Paste are grayed out in the Edit menu when a variable dialog is opened, necessitating the use of key commands.)
You can paste numeric data into any model variable. However you must ensure that the number of data points is appropriate to the location. The necessary formats are as follows.
1) A graphical function created within a flow or converter can hold up to 1500 data points (numbers only). See Chapter 4 for details on creating graphical functions. The data will be pasted into the Output column on the top, right side of the dialog. You can select all or part of the column. To select the entire column at once, click once on the word Output at the top of the column, as illustrated in Figure 8-2.
|
Figure 8-2 |
2) Reservoir, flow, and converter dialogs can be recipients of an equation or constant. All pre-existing contents of the equation box should be highlighted first, if they are to be replaced by the incoming data.
3) Queues and Conveyors can be the recipient of single or multiple constants for their initial values, but multiple numbers must be separated by commas. All pre-existing contents of the equation box should be highlighted first, if they are to be replaced by the incoming data.
|
[Note: If the data is being imported from a spreadsheet, a column of commas can be created alongside the column of data. Copying them together will bring the data in the necessary format.] |
4) Ovens can be the recipients of constant initial values. All pre-existing contents of the equation box should be highlighted first, if they are to be replaced by the incoming data.