Why the modification on a newly created element will reflect to an existing model element?
Visual Paradigm’s modeling tools are running in share model basis. This is meaning that a single model element can appear on different diagrams, or even on the same diagram multiple times (we call it the “views”). Changing the model element on one of the view will automatically reflected to other views. But sometimes you can may found that when you make changes on a new model element, changes also applied to other elements in your project, which is not what you looking for. There are 2 possibilities for this problem to be happen:
– Is your newly created model element is copy for an existing model element in the project?
– Are you creating the same named element on the same level?
If you are creating the model by copy and paste, then probably the shape you created during paste is just another view of the original model element. By default the paste action is to reuse the source element by creating a view (a shape) of it. In this case the newly created shape will be referenced to the same underlying model as the source shape, thus modification on the newly created shape will be updated to the same underlying model and being reflected to other views.
You can use Paste Model Element form the popup menu to avoid this problem. The Paste Model Element will create a replicated model element together with a view in the diagram. Since the replicated model element do not have any relationship to the original model, therefore the modification will not apply to the original model element.
Most of the model element types are not allow to have duplicated name in the same level (i.e. you cannot have 2 classes having same name under the same package). If you name a class which already exist in the same level then tools will consider you would like to reuse it, thus making your newly created class reference to the same underlying model. In this case your modification will also being reflected to other views. If this happens you than have to rollback your change, delete the newly created shape and re-create the correct model elements.
Is there a way to switch the default behavior to “Paste Model Element” instead of “Paste View”? I keep having to redo diagrams because I copy-paste whole structures, forgetting to use the right-click option to paste and then all my subsequent changes get propagated where I don’t want them to.
Ditto. It’s starting to get very annoying.
Hi SGM and TIMS,
Sorry for overlooking this message. Yes, there is a way to change the default paste behavior. Try this:
1. Select Windows > Application Options from the toolbar (If you are using Classic UI mode, select Tools > Application Options from the main menu)
2. Select “Keys” from the list on the left hand side
3. At the top of the page, enter “Paste”. You will see two rows remain – Paste and Paste Model Element
4. Select Paste Model Element
5. At the bottom of the page, click inside the Binding text field and press Ctrl-V
6. Select Paste
7. Click Unbind Command
8. Click OK to confirm the changes
9. Restart VP
Hope this helps. Should you have any questions please feel free to contact us.
Yes, that works for me. Thanks.