This functionality is only available for certain module packages.

You are here: Reference > SCRIPTING > Methods for components > Copy objects

Copy objects

Using the copy method of the CopyHelper, it is possible to copy instances within a project or in a non-project-specific manner. For this, the following parameters are required:

IUnitOfWork uow The UnitOfWork of the script
String sourceName Absolute name of the source object
String targetName Absolute name of the superordinate target component, i.e., of the object to which the copy is mounted. This may be a project, a mechatronic component or a placeholder.
String newName The name to be assigned to the copy at the target location. If the name is already taken, a number is added at the end and incremented until a free name has been found.