Save as text file...

One of the commands in the Save menu.

Availability

You can choose this command after selecting one or more objects.

Behaviour

The Object window will ask you for a file name. After you click OK, the objects will be written to a text file on disk.

File format

If you selected a single object, e.g., of type Pitch, the file will start with the lines:

File type = "ooTextFile"
Object class = "Pitch"

After this, the pitch data will follow.

If you selected more than one object, e.g., `Pitch hallo' and `Polygon kromme', the file will look like:
File type = "ooTextFile"
Object class = "Collection"
size = 2
item []:
    item [1]:
        class = "Pitch"
        name = "hallo"
        (pitch data...)
    item [2]:
        class = "Polygon"
        name = "kromme"
        (polygon data...)

The file can be read again with Read from file..., which, by the way, does not need the verbosity of the above example. The following minimal format will also be read correctly:

"ooTextFile"
"Collection" 2
"Pitch" "hallo" (pitch data...)
"Polygon" "kromme" (polygon data...)

Thus, all text that is not a free-standing number and is not enclosed in double quotes or < >, is considered a comment, as is all text following an exclamation mark (`!') on the same line.

Links to this page


© ppgb, January 29, 2011