Show related classes from other packages

Hi

I am creating an object model and have objects divided into many packages. In the class diagram under one of the packages I also want to display the related objects from other packages. For ex. I have a base class abc under package com.mycompany.package1. In another class diagram under a different package com.mycompany.package2 I have a class xyz that inherits from abc and I want to display this relationship in the class diagram for class xyz.

How do I achieve this.

Thank you,

Ravi…

Dear Ravinder,

Thank you for your message. You can drag the class from the Model Tree or the Class Repository into the Class Diagram (i.e. drag out the super class from the tree and put it into the class diagram containing the sub-class). When the class was placed in the diagram, you can create the generalization relationship between the classes. After the relationship was being created, you can remove the super class from the diagram. At this moment, the system will ask you to delete to model for the generation or not. Please make sure you have select NO. Then the generalization relationship will be created between classes across 2 diagrams.

Besides this approach, you can also create the third diagram for making the relationships. This extra diagram can be deleted after the relationship was being created. (Remember not remove the model from the repository)

Please feel free to contact us again if you have any further questions.

Best regards,
Rain

Rain

Thank you for your reply. I am able to create a relationship between objects in different packages with your suggestion. However, after I delete the associated class from the class diagram the relationship is not visible and users are not able to decipher it (From object model print outs). It is possible to create a relation ship beween two objects in different packages where the relation in a class diagram shows up like this:
____________________________
| |
|class1 (from package com.blah…)|
|___________________|
|
|
|
|
| class2 |
|-----------|
|attr1:… |
|attr2:… |
|
|

Hope this picture is clear enough. It shows up a little messed up in the preview. There is an association between class1 and class2.

Thank you,

Ravi…

Dear Ravinder,

Yes, you can create another diagram to do this. You can just drag out the class and put it into the diagram and add the relationships. This will not affect the parent & child relationship between package and class.

Please feel free to contact us again if you have any further questions.

Best regards,
Rain

Rain

I will try the approach you suggested.

Thank you once again,

Ravi…