The Clone item view enables you to clone, i.e., copy, a structure as a way of creating a new one. The new items retain all of the properties of the original items, like name, attribute values, and Description texts, but get their own SystemWeaver IDs, their own versioning history, etc. The view is configurable, and is only available for specified item types. This article describes how to use the view.
- Getting Acquainted with the View
- Setting up the Clone Operation
- Cloning to Clipboard
- Cloning and Open
- An SW Architect has configured and activated the view via Configure the explorer
Select the top-item in the structure to be cloned and select the view via the Items Ribbon, if configured to appear there, or by selecting it in the View drop-down list.
Things to Consider
- The copies that are created are maintained separately from the original items which can cause confusion between the originals and the copies. Therefore, the view should be used with care. For many use cases, taking out a new version of the selected structure is a better solution than cloning it. It depends entirely on the use case, and is worth discussing prior to utilizing the Clone item view.
- Identity attributes cannot be cloned. Objects created via cloning will get new, unique values.
Getting Acquainted with the View
The view is divided into two panes. The one on the left is for defining the library for the new structure, as well as the cloning option for each part. The pane on the right is for selecting which part type(s) to show, and also provides the option of setting the cloning action by part type.
Setting up the Clone Operation
Selecting a Library
First, select a library for the new item structure by either:
- Using the Select library button to select a library that you have Write access to. Your selection will appear in the Current Library field. Or
- Check the Use original library box to have the new items added to the same library as their original items.
Selecting the desired library prior to cloning minimizes the need and effort to move items into different libraries after the clone operation has been performed.
Viewing the Part Types and Setting the Action
Next, you will select the cloning action. In order to do this, you first need to use the Part types to show pane to the right to select the part type(s) that you want to see in the tree in the left-side pane so that you can select your action options.
In the below example, two part types are selected, and one is not selected.
Next, you will need to make a decision for all of the items displayed in the cloning tree in the view. Decisions can be made for each individual item, or by Part Type.
|Note: The options may already be set for you by your system's Architect in the view's configuration. The settings may not be editable.|
Explanation of the Actions
The following options are available for each item included as a part.
Clone: the original item will be copied. A new item will be created. The item currently selected in the structure is, by default, always set to be cloned.
|Note: Identity attributes cannot be cloned. Instead, they will get new unique values after the cloning.|
Include: the original item included as a part(s) of the specified type will be included (reused, as-is) in the cloned structure, without being cloned.
Ignore: is the opposite of Include. The item will neither be cloned nor included in the cloned structure.
Selections for individual items are made via a right-click context menu.
You can multi-select items in the structure and make a selection for all of them simultaneously. In the example below, three Document Sections are selected.
|Note: You can only multi-select items on the same level.|
Setting the Action by Part Type
Instead of selecting the individual part items, you have the option of setting the action by part type. To do this, right-click on the part type (that you already selected to display in the cloning tree) in the Part types to show pane. Select an option for all parts of the type.
In this example, all items of part type "Section item" will be cloned. The list provides a Count as well.
|Note: In case a part type is recursive, you still need to make an individual selection for each part in the tree.|
Handling of Sub-structures
There are some natural limitations on how you can clone a structure.
- If you select Include for an item, the entire item structure below the item will be included, as-is, with no possibility to modify the structure.
- The same applies for Ignore. The entire item sub-structure will be excluded in the resulting copy.
- If you select Clone for an item, you need to make additional selections for each part of the item.
The Error list that indicates any remaining actions before the cloning can be performed.
Once any errors are resolved, you are ready to clone. There are two options.
Cloning to Clipboard
Use the Clone to clipboard option to place the clone on your SystemWeaver clipboard. You can then remain in the open item structure tree and paste (Ctrl+V) the clone. This option may be suitable when cloning sub-structures of your model and placing the clone in the same model.
Confirmation of the clone operation is displayed in the Status bar as shown above.
|Note: Each click of the button creates a new clone.|
Cloning and Open
If you want to clone the model and open the clone in a new tab, use the Clone and open option. You can then e.g., chose to paste it into an existing structure or work on it separately.