Browse and locate your CSV file, then select a target package into which you wish to import, then choose the target element type, the button becomes enabled and you can click Next at this point, which will cause the Import CSV: Mapping dialog, see figure below, to appear. The dialog includes a list of properties that you can select to map with the columns in the imported CSV file, the button to map the properties and columns, key property selection, and the button to save the mapping.
A brief explanation of this step is you define mappings between CSV file columns and target element properties, by selecting a column from the CSV file and selecting a target element property, and then clicking the button. That CSV column will then be mapped to the selected property from the list. Repeat this step for each column until all of the preferred columns have been mapped. If you make a mistake you can simply click the button to remove that column and add it again. After the mapping, you can execute the import by clicking . Status messages will appear in your MagicDraw Notification Window and your containment tree should now be populated with the imported objects.
The table below explains the functionality of each element of the Mapping dialog.
Element | Functionality |
---|---|
If this Use First Row as Header checkbox is selected, the first row of the CSV file is treated as the header row and does not get imported. The checkbox is selected by default. | |
By default, when we map the owner property to define the parent element, CSV Import will look up for the element by element name. There is the use case that Requirements may not have names but use ID as a unique identifier. By selecting the Find owner by the "Id" tag option, CSV Import will look up for elements by the ID property instead of names. | |
This Properties list shows the name, type, and owner of each property, which a target element may possess. Each property in this table is clickable. You can select a property (selected rows are highlighted) and map it to a column from the CSV Data table, shown on next row. | |
The CSV Data table shows the CSV file contents. You can select a property from the Properties table and select a column from this CSV Data table (selected columns are highlighted), and then click to map them. You will see a row added to the Property Map table, shown on next row. | |
The Property Map table shows which
| |
The Key property option allows you to set a unique key for the data you are importing. By selecting a row from the Properties table and a column from the CSV Data table, click the button. | |
Identifier key for relation ends option allows | |
Clicking the button will add a map Clicking the button remove the | |
The Save Mapping As button allows you to | |
This dialog prompts you to specify the name See more about this dialog in section - Saving | |
The Save Mapping button brings up a dialog shown in the above row. The Save Mapping button allows you to save the current import map. The map will be stored into the model and you can view it in the Containment Tree. | |
The button is used to go back to CSV Import Setup screen. | |
The button is used to proceed to the CSV Import Mapping screen. | |
The button is used to start the import process and exit the CSV Import wizard interface. | |
The button is used to cancel the import process and exit the CSV Import wizard interface. |