I am trying to implement a 2nd copy function, but nothing is being added to the diagram when I paste after using the new copy.
This is what the new method looks like:
<span ="Apple-tab-span" style="white-space:pre"> </span>public void CopyWithData()
{
CopiedParts = this.Diagram.SelectedParts.ToList();
var CopiedDatas = Diagram.Model.CreateDataCollection();
foreach (Node node in CopiedParts.Where(x => x is Node))
CopiedDatas.AddNode(((ItemData)node.Data).CopyWithData());
foreach (Link link in CopiedParts.Where(x => x is Link))
CopiedDatas.AddLink(((LinkData)link.Data).Clone());
CopyToClipboard(CopiedDatas);<span style="font-size: 12px; line-height: 1.4;"> </span>
}
What do I need to change/add to make these objects available for the Paste command?
Thanks
Ryan