Description

Add frames to this collection from the ParentImage's frames

Return Type

None  

Syntax

object.Add [FramesToAdd]

The Add Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McFrames.
FramesToAddOptional. A Variant value.

VARIANT : An optional selector for the frames to be included in the collection. If missing or a scalar -1, all frames in the ParentImage are included. This selector may be an array of VARIANT, in which case the contents of each VARIANT are added to the collection. Each VARIANT may be a single scalar index value (if negative, then all frames are added), or it may be a single scalar LONGRANGE giving Start and End frame indices, or it may be an array of index values or an array of LONGRANGE index ranges. In addition, it may be an McFrame object instance or an array of them; each of these McFrame instances must one of the frames in the ParentImage's frame list. Finally, the FramesSelector argument may be an McFrames collection (or an array of them) with a ParentImage the same as this one's. In this case the entire contents of the source McFrames collection(s) is added to this McFrames collection.

Remarks

The McFrame instances from the ParentImage's list of frames to be added can be specified in a number of ways based on the optional FramesToAdd argument. If the FramesToAdd argument is missing, then all ParentImage frames are added to the collection in their natural order.

You usually do not need to call this method, because the McImage.Frames property that you get to create a new McFrames instance takes an optional FrameSelector argument that is used to initially populate the collection.

Exceptions

Frames added must have the same ParentImage as this one's. Frame indices specified must be within the range of 0 to ParentImage.FrameCount-1. A specified McFrame instance must be one of the ParentImage's frames.

Notes

Indices specified in the FramesToAdd argument are FrameIndex values for the position of the frame in its ParentImage.

An McFrame instance may appear in an McFrames collection more than once.

If a frame is moved to another image (via McImage.MoveFrames) or is removed from the image altogether (via McImage.RemoveFrames or by the McImage being fully released), then that frame is automatically removed from any McFrames collection holding it.