Description

Save an overlay collection.

Return Type

None  

Syntax

object.Save Destination, [TagNumber]

The Save Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McGraphOverlay.
DestinationRequired. A Variant value.

Either a string file name, an object IStream interface pointer, an object IStorage interface pointer, or a numeric TagNumber. If a file name is given, the file is written as a compond document file holding the saved overlay information. If an IStorage is supplied, a stream with the ClipboardName is filled with the saved information.

If an McStream object is given or the Destination argument is missing, then save information is written to the TIFF tag number given by the TagNumber argument. If the Destination argument is missing, then the McGraphOverlay instance must be an operator with an ancestor McImage. Furthermore, this ancestor image must have its McImage.File object set to some file name. The overlay information is read from the specified TIFF tag, which must have been previously written with a call to the Save method.

TagNumberOptional. A Long value.

If given, this is the TIFF tag number to use for the load. If missing, then a numeric tag value of mcttOVERLAY_ANNOT is implied if the ClipboardName property is “McImage.AnnotationOverlay”, and a numeric tag value of mcttOVERLAY_AOI is implied if the overlay is an operator with a parent McRegions named “Aoi”. If this McGraphOverlay is not one of these two special cases, then you must supply the desired tag number.

Remarks

This method is a friendly front end for the IPersistFile and IPersistStream interfaces that McGraphOverlay exposes. The method supports saving to a disk file, to an IStream, to an IStorage or to a specified tag number in a Tiff file.

Exceptions

The call will fail if a TagNumber value or McStream object is supplied, but the destination McStream object does not support tags.

Notes

The save of the AnnotationOverlay shown in the first example is done automatically for you whenever an image file is saved in a format that supports tags.

When a Tag value or McStream is given as the Destination, then the McImage.File or McStreamForTags object is left open. To finish the read, the client must call the McStream.Close method, however, you should never do this for the McImage.File object, since this is handled by the application.