To create a diagram by importing data from a CSV file


  1. Open an existing MagicDraw project or create a new project.
  2. Click File > Import From > Import CSV. The Import CSV: Setup screen will appear, see figure below.

     Importing a CSV File as a Diagram

  3. Click to browse and select the above CSV file.
  4. Select a for the diagram.
  5. Choose Diagram as the target element type since we are creating a diagram.
  6. Choose DiagramInfo as the target stereotype.
  7. Choose Class Diagram as the target diagram type.
  8. Click . The Import CSV: Mapping screen will open, see figure below.

    Mapping CSV Columns with Diagram Properties
  9. Click the first column in your CSV Data table and select the attribute Name from the Properties table on the left-hand side, and then click the button to map     them, see figure above.
  10. Keep the name property from the Properties list selected, and also keep the DiagramName 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.
  11. Click . Your MagicDraw containment tree should show the newly imported class diagram, see figure below.

    The Imported Diagram in the Containment Tree in MagicDraw