From the last figure in the preceding section, you see that the properties for the Customer class have been added, but no associations are present yet. The following example shows you how to add some associations to our Class Diagram from above.

 

To import association between classes


  1. Click File > Import From > Import CSV to open up the CSV Import plugin wizard interface, see figure below.

     Importing Associations to the Class Diagram

  2. Click to browse and select your CSV file.
  3. Select a target package.
  4. Select Association as the target element type.
  5. Click . The Import CSV: Mapping dialog will open, see figure below.

     Mapping CSV Columns and Property Types

  6. Map AssociationName from the CSV file and name from the target Properties list.
  7. Keep the name property from the Properties list selected, and also keep the AssociationName column from CSV data source selected, then click the button   beside the Key Property textboxes. The Key Property textboxes should populate as shown in figure above.
  8. Map the column Source from the CSV file and select source from target Properties list.
  9. Map the column Target from the CSV file and target as the property type.
  10. Map the column RelationInDiagram from the CSV file and Diagram from the Properties list.
  11. Select the name row from the Property Map table and then click the  button beside the Key Property textboxes. The Key Property textboxes should populate.
  12. Click .Your MagicDraw containment tree should be updated with the recently imported associations, see figure below.

    Imported Class Diagram with Classes, Properties, and Relationships

You can see the imported Class Diagram is now populated with Classes, properties and relationships as shown in figure above.