We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Symbol cloning and CenterPort location

I am trying to clone a symbol and add it to a diagram. The node is getting added to the diagram ok but the centerport location of the cloned symbol is set to 0,0 so when I try to link to it the link is coming from 0,0 on the diagram not the centerport of the symbol. Example program attached that copies nodes from one diagram to another and then a button that activates the link tool. WindowsApplication2_2769.zip Is there a work around or a better way to do this? Thanks Truman

1 Reply

TL Truman Lackey November 4, 2004 01:57 PM UTC

I found my answer for any that have a similar problem. The CenterPort parent needs to be set to the node. So i have newNode = node.Clone() newNode.CenterPort.Parent = newNode This fixes the CenterPort of having a location of 0,0.

Loader.
Live Chat Icon For mobile
Up arrow icon