Writing a Resizable Array Parameter to a File

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


Before you begin: You must specify the file to write and display its content in the Parse tab of the Text Parser Editor before you map a parameter to 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 an entire line of text to associate with the parameter.

    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. From the parameter list, select a resizable array parameter, and 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 in the Create New Parameter dialog box.
    Note: You can map a parameter to multiple locations in the file. The parser writes the same parameter value to each of the specified locations.

    Optimization Process Composer creates an array parameter of the appropriate type and dimension if it does not already exist. Optimization Process Composer maps to as many consecutive rows as possible, as long as the row contains at least as many values as the row you originally selected.

  4. Optional: If desired, configure the parse options described in Configuring a Write Operation.
  5. Optional: If desired, select to insert the contents of a selected file in front of the line containing the selected text. You can use this option to improve the performance of the Text Parser adapter by restricting the parsing operation to only portions of the file that are changing.

    You can enter the name of the file to insert or select the name of a file from a local directory. The file must be present in the working directory when the Text Parser adapter runs.

    The text in the Actions area describes the file that will be inserted and the line number of the insertion point.
  6. 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.
  7. Click Ok to save your changes and to close the Text Parser Editor.