GoDiagram Web Reference
AddCopy Method

Add a copy of an object into this document at the given point.
Syntax
'Declaration
 
Public Function AddCopy( _
   ByVal obj As GoObject, _
   ByVal loc As PointF _
) As GoObject
public GoObject AddCopy( 
   GoObject obj,
   PointF loc
)

Parameters

obj
loc

Return Value

The newly inserted object.
Remarks

This creates a singleton collection and calls CopyFromCollection(IGoCollection,Boolean,Boolean,SizeF,GoCopyDictionary) with the appropriate offset. This method is different from Add in that the latter method causes the document to own the object; i.e., the object's GoObject.Layer property is modified to be this document's default layer. But this method does not modify the obj and may add the copy to a different layer, if obj belongs to a layer and CopyFromCollection can find a matching layer in this document.

If you want to make a copy of a GoObject but do not want to add it to a document, you can call GoCopyDictionary.CopyComplete or GoObject.GoObject.Copy.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoDocument Class
GoDocument Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback