Reading a Resizable Array Parameter from a File

You can map the values at a selected location in the text file, along with the values in subsequent rows, to the elements of a resizable array parameter. During run time Optimization Process Composer continues to map rows to the resizable array until the number of columns changes or it encounters an incompatible value.


Before you begin: You must specify the file to read and display its content in the Parse tab of the Text Parser Editor before you map an array parameter from a selected section of the file.
See Also
About the General Text Parser Adapter
Specifying Word Separator Preferences
  1. Display the content of the file to parse, as described in Specifying the File to Parse.
  2. From the display area on the left side of the Text Parser Editor, select the text to associate with the array parameter.

    To create a one-dimensional array, select a single value from the top of a column of numbers. To create a two-dimensional array, select values from the tops of multiple columns.

    Tips: You can create a marker indicating the relative position of the mapping in the text file, as described in Defining a Marker. You can also click , , and to help you locate the text to select.

    A context toolbar with several options appears.
  3. To map the selected text and following rows to a parameter, do one of the following:
    ActionInstructions
    Map to a new parameter immediately From the context toolbar, select .
    Map to an existing parameter immediatelyFrom the parameter list, select a resizable array parameter. From the list of icons at the center of the dialog box, select .
    Note: You must indicate that an array parameter is resizable when you create it, by selecting Dimensions are resizable checkbox in the Create New Parameter dialog box.
    Map to an existing parameter and configure the parse
    1. From the context toolbar or the list of icons in the center of the dialog box, select .

    2. In the dialog box that appears, type name of an existing resizable array parameter.

      Note: You must indicate that an array parameter is resizable when you create it, by selecting Dimensions are resizable checkbox in the Create New Parameter dialog box.
    3. Select 1D Array or 2D Array from the Map with list, and configure the options described in Configuring a Read Operation.

    Note: You can map to a given parameter from only one set of locations in the file.

    Optimization Process Composer maps values from as many consecutive rows as possible, based on two conditions:

    • Each row must contain enough values with a type that matches the values you originally selected.
    • The entire row must contain the same number of values as the row from which you originally selected values, even if you did not select the entire row.

    Optimization Process Composer creates an array parameter of the appropriate type and dimension (if it does not already exist) and maps the values from each row to the elements of the array.

  4. Optional: If desired, configure the parse options described in Configuring a Read Operation.

    You can configure several aspects of the parse, including skipping header and footer rows.

  5. Optional: If desired, you can delete parameters or mappings using any of the following methods:
    1. Select a parameter and click from above the parameter list to remove the parameter along with its mapping.
    2. Click anywhere within the highlighted text related to the mapping. From the context toolbar that appears, click to remove only the mapping.
    3. Select a parameter and click from the icon list in the center of the dialog box to remove only the mapping.
  6. Click Ok to save your changes and to close the Text Parser Editor.