Difference between revisions of "FILE OPEN"

From Macros Wiki
Jump to: navigation, search
Line 2: Line 2:
{{Command|syntax=FILE_OPEN <filename>, <file Number>, [<action>]
{{Command|syntax=FILE_OPEN <filename>, <file Number>, [<action>]
|description=Open a text file.
|description=:Open a text file.

Revision as of 09:56, 19 August 2010



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

Open a text file.


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.
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.


For an example macro see Get_Op_Tool_Path Global_Local Print_Geo_Data_To_File