## Opening a File for Reading or Writing

The Insert | File I/O Command | File Open menu option allows you to put a command in the Edit window that will open a disk file during execution of the part program.

Files can be opened simply to view information or to add and save information.

The syntax of this command in the Edit window is:

<filepointername> =File/Open,<filename>,<openmode>

<filepointername> | This is the user chosen ID of the filepointer that is used to access the opened file. This ID is used to refer to the open file in other file I / O commands.
<filename> | This is the filename of the disk file to open.
<openmode> | This is the mode the file should be opened in. Files can be opened in the following modes : Read, Write, or Append.

To access the dialog box associated with this File I / O command:

1. Open the Edit window.

2. Place your cursor on the File Open command.

3. Press F9.

More:

Sample Code for File Open