Visual Paradigm Tips: Using Mirrors in Project References

What is mirroring?

Views that reference model elements are read-only, and you cannot add any graphics. This is a big problem when you're reusing a package in a project and want to add extra graphics to that package.

To overcome this problem, you can create a container-typed image of the referenced model elements. With mirroring, locally referenced elements mirror elements in the referenced project by maintaining a mirrored copy of the project. The copied image can be accessed through the Model Explorer in the list of model elements in the current project, but cannot be edited.

Create an image

Here, first you will learn how to create a project reference between two projects. Then you'll learn how to create an image and see what the model elements of that image can do.

1. Download Shapes.vpp from the official website .

2. Open a new project.

3. From the toolbar select Project > Referenced Project...

4. In the Manage Referenced Projects window, click Add , and then select the downloaded project file Shapes.vpp .

Visual Paradigm

5. Click Close . You can see the Model Explorer  appear on the left hand side of the screen. This contains a list of model elements for Shapes.vpp .

Visual Paradigm

6. Create a class diagram. Select Diagram > New from the toolbar .

7. In the  New Diagram  window, select Class Diagram , then   Next .

Visual Paradigm

8. In this tutorial, the chart name is not important, so leave it the same and click  OK .

9. Let's try to reuse the package from the referenced project and see what happens if we edit it.  Drag and drop the shapes  package into the diagram in Model Explorer .

Visual Paradigm

10. This is how model elements are normally reused from referenced projects. Now, let's try to create a class in the package.

Visual Paradigm

You can see the warning in the image below that you cannot add something to the package.

Visual Paradigm

11. Click OK to close the warning.

12. Delete the created class.

13. In order to add something to the package, you need to convert it to an image. Right-click on the package's graphic and select Convert to Mirror from the drop-down menu  .

Visual Paradigm

14. Try again to create a class in the package. At this time, the warning no longer pops up.

Visual Paradigm

By converting the referenced element to a mirror, you can add elements inside it. But to be clear, you cannot perform other editing actions, such as renaming or changing any of its properties.

Download the latest Visual Paradigm trial version >>

This article is translated from the official website of Visual paradigm

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326776886&siteId=291194637