.. index:: Copy

.. _Copy:

Copy
====

The copy function is activated either from the Copy item of the :ref:`Edit Menu<Edit_menu>` or from pressing the copy button which is found in both the :ref:`Edit Mode<Edit_mode>` Tool Bar and the :ref:`Run Mode<run_mode>` Tool Bar (see Figure 1).

.. figure:: images/Copy.png
	:width: 7%	

	Figure 1: The copy tool button from the :ref:`Main Window<Main_Window>` Tool Bar.

When you have activated the copy function, you have the selected sub-network copied onto the clipboard of the Windows system. Then you can use the :ref:`paste function<paste>` in the HUGIN Graphical User Interface to make a copy of it in the same or another Network Pane (which must be in Edit Mode).

When you cut a selected sub-network, all internal links in the sub-network are copied to the clipboard. Also links from external nodes to nodes within the selection are copied and can be restored when pasting. Links from nodes within the selection to external nodes, however, are not copied.

When pasting a sub-network from the clipboard, a link from an external node to a node within the sub-network is restored if the external node "exists" in the new network. Here, we say that a node "exists" if a node appears with the same :ref:`node name<node_name>` as the external node in the original HUGIN network. The external node in the new network needs not have the same :ref:`node label<node_label>` as the external node in the original network. If the external node does not "exist" in the new network, the link is not restored. This has impact on the :ref:`conditional probability table<Conditional_Probability_Table>` of the node which the link pointed to and one should reconstruct it.