Copying Module Definitions with Dependents
There are two, somewhat related but special methods available for copying and transferring entire module hierarchies. Of the two, Copy Transfer is the recommended and most convenient method.
See also, Smart Paste for more information.
Module definitions may be copied directly from the definitions branch and transferred (pasted) to another project, either as a single definition, or including all dependent definitions. In other words, if a module contains other modules as part of its definition, and perhaps these modules have other modules inside, and so on, all module definitions will be included in the definition copy. When the definition is pasted, either in the same project or another project, copies of all the dependent definitions will also be included, along with all of the hierarchal linking information. When any of these pasted definitions are instantiated on the canvas, all child modules (i.e. modules defining its definition) will be instantiated as well, in the proper order.
This feature is provided mainly for inter-project transfer of modules, alleviating the need to manually reconstruct the module and its hierarchy. It may also be used for copying and pasting within the same project, however, the dependent definitions will remain the original, and only the module definition being copied will be renamed.
Custom component definitions that happen to reside on any of the dependent modules will also be included.
To copy a module definition with its dependents from one project to another: Select the source project in the workspace primary window and expand the definitions branch. Right-click on the definition and select Copy from the popup menu.
Next, select the destination project, right-click on its definitions branch and select Paste.
Lastly, instantiate the definition and paste it on the canvas (see Creating the First Instance of a Definition).
The same process as described above can also be used for copying and pasting a module definition within the same project, except the source and destination projects are the same.
The process described above is a simple definition copy of an entire module hierarchy, including all dependent module definitions. Copy Transfer addresses the two major shortcomings: Instance information (i.e. parameter values) of the top-most module is included in the copy; and the module hierarchy is automatically re-linked together on paste, even if some or all of the definitions need to be renamed. In addition to these, Copy Transfer also provides the convenience of copying directly from the component instance, as opposed to having to use the definition tree.
NOTE: As PSCAD V5, multiple selected modules can be copy transferred simultaneously.
To copy transfer a module definition with its dependents, simply right-click on the top-level module instance and select Copy.
This action copies all module definitions that are part of this module hierarchy, along with the instance information (i.e. entered parameter data) of the top-level module. To paste the new hierarchy, right-click on a schematic canvas in any loaded project and select Paste Special | Paste Transfer.
NOTE: A module hierarchy that has been paste transferred is completely unique from and exclusive of the copied original.
See Also: