On this page
Main conditions
You can create relationships between existing model elements by importing them from Excel/CSV files. For this the following conditions must be met:
- The source/client and target/supplier elements you want to create relationships between must exist in the project.
- The Excel/CSV source and target columns must be mapped with the Client/Source and Supplier/Target properties in the mapping area of the Excel/CSV Import dialog.
- The source and target elements must be legal in terms of Metamodel, DSL and code rules, e.g., the satisfy relationship client must be a requirement.
- The source/client and target/supplier elements you want to create relationships between must exist in the project.
Preparing the Excel file to import relationships
When creating relationships in the model by importing them, you need to make sure the Excel file contains the source and target columns. The source column contains the names of elements that are the client of the relationship. The target column contains the names of the elements that are the suppliers of the relationship. In the example below, the Source column contains the names of the Blocks and the Target column contains the names of Requirements.
The Excel file content prepared with element names for the relationships import.
If you have to deal with a large a scope of information, the elements are not under the same target scope, or you want to increase the import speed, use the following:
- Select to search elements and references in the Target Scope Only in the Excel/CSV Import dialog when importing data.
- Define your source and target columns in the Excel file with qualified names of elements. In the example below, the Source column contains the qualified names of the Blocks and the Target column contains the qualified names of Requirements.
The The Excel file content prepared with qualified element names for the relationships import.
Relationships import procedure
To import relationships
Prepare the Excel file for relationships import. How to prepare the Excel for the relationships import >>
Open the project in the modeling tool.
Make sure the elements you want to create relationships between exist in the project.
How to import Blocks and their properties >>
How to import Requirements >>In the top-left corner of the modeling tool, click the File > Import From > Excel/CSV File > Import Using New Map.
For element import via tables, use the Exce/CSV Sync functionality.
- In the Excel/CSV Import dialog, select the Excel file. How to >>
- Specify the mapping options:
- Import Type - select the Element value.
- Element Type - select the relationship type you want to create.
- Properties to Map - the Client and Supplier properties are selected by default.
Target Scope - select the Package you want to contain imported relationships. If the Owner property is selected as the Properties to Map option value, the data is imported according the owner.
You can specify more mapping options according to your needs. Learn more about mapping options >>
Create the mapping between Excel file columns and element properties by dragging the Source column on the right to the Client property on the left. Do the same with the Target and Supplier or other columns/properties. Learn more about mapping area >>
- (Optional) Click the Save Map button to save your map options as the Import Map. Learn more how to save Import Map >>
- Click the Import button.
The relationships are imported. If any of the imported relationships already exist in the model they are updated. To avoid duplication of elements specify Identification Property value or Identify Relationship (End) Source by and Identify Relationship (End) Target by values. Learn more about mapping options in the Excel/CSV Import dialog>>
The relationship import can fail due to the following reasons:
- The relationship end is empty in the data file.
- The source or the target elements do not exist in the model or the mechanism didn't find any.
In the following example, you can see specified import options in the Excel/CSV Import dialog before the import. After the import the Satisfy relationships are created between the defined Source and Target elements: Blocks and Requirements.
The import of Satisfy relationship.
Related pages