Object Model Diagrams Transformation

Object Model Diagrams in Rhapsody

Object Model Diagrams show the static structure of a system: the objects and their associations and operations, and the relationships between classes and any constraints on those relationships.
In Rational Rhapsody, an object model diagram is the equivalent of a class diagram. However, an object model diagram is specified for the object structure, while a class diagram is specified for the class structure.

Source: IBM Knowledge Center.

Object Diagrams in MagicDraw

An Object diagram is an instance of a Class diagram that shows a complete or a partial view of the structure.
This type of diagram displays instances of classifiers and links (instances of associations) between them.

Purpose

An Object diagram is usually used in the early phases of a project to model examples that show a possible snapshot of the system execution, for example, what the system can look like at some point in time. Additionally, it focuses on the attributes of a set of objects and helps to analyze how these objects relate to each other.

Usage

An Object diagram can be used to:

Summary

Object diagrams are valuable because they:

Source: MagicDraw Documentation.

Object Model Diagrams transformation

There are differences in concept between the two tools.

Transforming Rhapsody Object Model Diagrams as MagicDraw Model Diagrams really depends on the intent of the model.
Given the differences in concepts between the two tools, we have introduced an option to allow a better transformation of the concepts.
rhp2md.graphical.object_diagram.instance_specification

This option can be controlled in the publisher.properties file.
Depending on the concepts used to model the Object Model Diagram in Rhapsody, the option should be set to true or false.
If you are using Object Model Diagrams in Rhapsody, with most Classes in them, you should set the option to false if you want to get Class Diagrams in MagicDraw.
If you are using Object Model Diagrams in Rhapsody, with most Objects in them, you should set the option to true, if you want to get Object Diagrams in MagicDraw.

Object Model Diagram with Objects in Rhapsody

rhp2md.graphical.object_diagram.instance_specification set to false

rhp2md.graphical.object_diagram.instance_specification set to true

Setting object model diagram property

To transform Object Model Diagrams to Object Diagrams, set to following option in publisher.properties file:

# Determines whether Properties in Object Model Diagrams are transformed to Instance Specifications. Available values: true, false - default false
rhp2md.graphical.object_diagram.instance_specification=true

To transform Object Model Diagrams to Class Diagrams, set to following option in publisher.properties file:

# Determines whether Properties in Object Model Diagrams are transformed to Instance Specifications. Available values: true, false - default false
rhp2md.graphical.object_diagram.instance_specification=false