Double-click the Data Exchanger component icon . The Data Exchanger Component Editor appears.
From the Data Exchanger Component Editor, click the large button
in the center of the editor to begin defining a data source.
The Exchanger Wizard appears with the Select
File screen displayed.
Click Write a File.
-
In the Template file to update text box, enter
the template file that you want to use. You can click Browse
to locate the file. If you do not enter a template file, the Data Exchanger
component creates the file by writing parameter values.
Note:
An input file parameter is created for the template file. This
file parameter has the same name as the file being written, with “Tmpl”
appended. While the template file is usually fixed, it is possible to
map another file parameter to the template file parameter, allowing the
template to vary at run time.
-
In the File to write at runtime text box, enter
the file to write at run time or select an existing file parameter. If
you browsed to the template file, this text box is filled automatically
with the name of the specified file.
If you entered a file name, the Data Exchanger component creates an
output file parameter. The parameter name is the same as the name of
the file being written, but with periods converted to underscores. The
output file parameter can be mapped to subsequent components in the simulation
process flow. It appears on the Output Files subtab
of the Design Gateway Files tab.
Two file parameters are created: one for the template file and one
for the file being written. The file parameter for the template file
is mode input, has “Tmpl” added to the parameter name, and appears
on the Input Files subtab of the Design Gateway
Files tab. The template file is usually left as
is, but it can be mapped if the template changes from run to run.
Note:
For the input Data Exchanger of a Simcode
component, only one file parameter is created because the OS Command
part of the Simcode component reads the file directly from the working
directory. The file parameter has the same name as the sample file and
is an input file parameter.
In the Encoding list, select the type of encoding
that you want to use.
You can use this option to explicitly specify the encoding the file
parameter is to use when converting between bytes and characters. In
a Locale (a system setting that includes the language, number formats,
and character set in use) that uses multibyte characters (Japanese, Chinese,
Korean), there is a default encoding used to convert bytes into characters.
Most text files are written using this encoding, but sometimes it is
necessary to specify this encoding. For additional information on encoding,
see File Type and Encoding in the Isight Development Guide.
Note:
This setting is visible only if the Show
File Type Encoding option on the Files tab is selected on
the Preferences dialog box. For more information
about Preferences, see Setting Files and Directories Preferences in the Isight User’s Guide.
In the Line Ending list, select how you want
the lines to end:
Option |
Description |
Default |
Leave the line
endings as they were found in the input file. Isight
does not attempt to change the line endings. If the file has to be copied
for some reason, local line endings are used. |
Local |
Write the file with
the local line endings for the computer on which the model is running.
This is the location of the Isight
Gateway and the SIMULIA Execution Engine
station. This means CR-LF on Windows and LF on Linux. The file will always
be copied in text mode and the line endings updated, even if the line
endings already appear to be correct. |
Linux |
Always separate lines
with LF, even if the model is running on Windows. |
Windows |
Always separate
lines with CR-LF, even if the model is running on Linux. |
Click Next.
The File Format screen appears.
Select one of the following:
Option |
Description |
General Text |
Text with no particular structure. Fields are located by
searching for words or phrases. |
Name/Value |
Data organized as a list of name/value pairs, where the
name is the first word on the line and there is a delimiter (space or
some punctuation) between the name and the value. Fields are located
by matching names. This format is used only with specially formatted
data; however, it does allow the variable names to be automatically selected
based on the field names. |
Table |
Tables and lists of numbers. Fields are identified by row number
(line) and column number. This format can be used with files in any format
as long as the line numbers never change; the number of entries on each
line do not have to be the same. The cells in the table can be separated
by delimiters (e.g., space, comma, etc.), or the table columns can be
defined by absolute character position (sometimes useful for reading
packed Fortran formatted data). The Table format
allows whole columns, rows, and arrays to be read into array parameters
in one action. |
Vector |
Data organized as a list of values separated by spaces or punctuation.
Fields are numbered sequentially through the whole section. The Vector
format allows one-dimensional arrays to be read in one operation. The
values can span multiple lines. This option is often used for Fortran
list-directed input. |
If you selected the Name/Value format, do one of the following:
-
Click the delimiter that you want to use.
Delimiters are characters that delimit multiple name/value pairs on
a line; if Allow comments after Value is selected,
delimiters indicate the start of a comment. For more information, see
About Delimiters.
Once you make a selection, the highlighted information in the Sample
Text area is updated: the name fields are highlighted in
orange, and the value fields are highlighted in green.
-
Click More to select additional formatting options,
as desired.
-
Click Next, and determine how you want entries
to be read from parameters.
- Click Write All if you want all the entries in
the Name/Value file to be written automatically
from parameters with the same name as the Name
field of the item.
- Click Clear All to remove your selections.
-
Edit the parameter information, as desired.
For more information, see About Editing Parameters.
Click Finish.
The file is displayed in the Data Source area
as a new tab.
Click OK to save your changes and to close the
Data Exchanger Component Editor.
|