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
- Click File > Import From > Import CSV to open up the CSV Import plugin wizard interface, see figure below.
- Click to browse and select your CSV file.
- Select a target package.
- Select Association as the target element type.
- Click . The Import CSV: Mapping dialog will open, see figure below.
- Map AssociationName from the CSV file and name from the target Properties list.
- 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.
- Map the column Source from the CSV file and select source from target Properties list.
- Map the column Target from the CSV file and target as the property type.
- Map the column RelationInDiagram from the CSV file and Diagram from the Properties list.
- 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.
- Click .Your MagicDraw containment tree should be updated with the recently imported associations, see figure below.
You can see the imported Class Diagram is now populated with Classes, properties and relationships as shown in figure above.