public virtual void CopyToClipboard( IGoCollection coll )
Parameters
- coll
The collection is copied into a new document of the same class as the Document property value. (That document class must have a public zero-argument constructor.) This method then calls GoDocument.MergeLayersFrom this view's document and then calls GoDocument.CopyFromCollection to make a copy of all of the objects in coll in the new document in the appropriate layers. Note that in order to maintain the distinct layers of the objects being copied, each document layer needs to have a unique identifier, GoLayer.Identifier. The new document is then inserted into the clipboard using that document's GoDocument.DataFormat.
To facilitate pasting into regular (not GoDiagram) documents, this method calls CreateDataObject to support additional data formats. If the coll is null or empty, the clipboard is cleared of any previous data values.
All of the objects in the collection will be copied by serializing them. If any of the objects, or any of the objects that they refer to, are not serializable, there will be a serialization exception, and the clipboard might not a copy of the argument collection. Exceptions will be logged to any trace listeners. The User Guide discusses serialization and deserialization in more detail.