editPaste in SubGraph

Hi,

I am using GoDiagram. I use GoSubGraph control like LimitingSubGraph in your examples.

I have graphnodes added to Subgraph. When i copy paste the nodes inside subgraph i want to paste the nodes into existing subgraph. But currently it is adding to new nodes to main view instead of subgraph.

I am using EditPaste command for pasting.

Can you please suggest some ideas how can i achieve this.

Best regards,

Venkatesh

If you want to change how only edit-paste works, you should override GoView.PasteFromClipboard. Non-trivial, and given you’re still just doing an eval, it may be more work than you want to do.



My suggestion is to look at SubGraphApp and how it’s dragging tool allows you to Shift-drag objects into a subgraph.

Thanks for your sugestion.

Here is my code below
Public Overrides Function PasteFromClipboard() As Northwoods.Go.GoCopyDictionary
Dim l_Copy As GoCopyDictionary = MyBase.PasteFromClipboard()
Dim rNode As GraphNode
Dim obj As GoObject
For Each obj In l_Copy
If (TypeOf obj Is GraphNode) Then
rNode = CType(obj, GraphNode)
If rNode IsNot Nothing Then
’ add to curreent subgraph
End If
End If
Next
End function

when i run this code getting Unable to cast object of type ‘System.Collections.DictionaryEntry’ to type ‘Northwoods.Go.GoObject’.

Can you suggest how can get objects from gocopydirectory?

Hi,

I fixed the problem my self, no need to reply. Thanks again for your help