FILE OPEN

From Macros Wiki
Revision as of 09:56, 19 August 2010 by ConnerO (talk | contribs)
Jump to: navigation, search

Up

Command

FILE_OPEN <filename>, <file Number>, [<action>]


Open a text file.

Parameters

<filename>
Filename as either text in double quotes, or a text variable.
If the filename does not contain full path information, then the file will be opened in the same folder as the macro.
<file Number>
File number, 1 to 10. You may have up to 10 files open at the same time.
[<action>]
The file action may be READ, WRITE or APPEND.
A file opened for READ must already exist.
A file opened for WRITE will be created, if it does not exist, or overwritten (without warning) if it already exists.
A file opened for APPEND will be created, if it does not exist. If it does exist, it is opened and the file pointer is moved to the end of file so that output is appended to the end of the file.

Example

FILE_OPEN
For an example macro see Get_Op_Tool_Path Global_Local Print_Geo_Data_To_File