Articles in this section
Category / Section

How can I copy/paste Diagram nodes?

1 min read

How can I copy/paste Diagram nodes?

The following code sample demonstrates how you can copy and paste nodes (symbol, shape, or link) in Essential Diagram:

[C#]

//Copy Code this.diagram1.Controller.Copy();
//Paste Code //if the data in the clipboard is of the type ClipboardNodeCollection //paste it onto the Diagram IDataObject clipboardData = Clipboard.GetDataObject(); if (clipboardData.GetDataPresent(typeof(ClipboardNodeCollection))) {  this.diagram1.Controller.Paste(); }

[VB.NET]

'Copy Code Me.diagram1.Controller.Copy()   'Paste Code 'if the data in the clipboard is of the type ClipboardNodeCollection 'paste it onto the Diagram Dim clipboardData As IDataObject =  Clipboard.GetDataObject() If clipboardData.GetDataPresent(Type.GetType(ClipboardNodeCollection)) Then  Me.diagram1.Controller.Paste() End If

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied