Main Content

saveProfileMapping

Class: slreq.ReqSet
Namespace: slreq

Save profile mapping to XML file

Since R2023b

Description

example

saveProfileMapping(rs,mappingFile) saves the profile mapping for the requirement set rs to an XML file with name specified by mappingFile. The profile mapping maps the requirement and link attributes from an external ReqIF™ file that was previously imported into the requirement set rs to the stereotypes and stereotype properties in the profile assigned to rs.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Profile mapping file name, specified as a string scalar or character vector.

Example: "myMapping.xml"

Examples

expand all

This example shows how to import requirements and links from ReqIF files programmatically using a profile and save the profile mapping to an XML file.

Import the requirements and links from the myReqIF ReqIF file. Create a new profile called myProfile and assign it to the imported requirement set. Return the handle to the requirement set object.

[~,~,myReqSet] = slreq.import("myReqIF.reqif", ...
    profile="myProfile.xml",importLinks=true);

Save the profile mapping to an XML file called myProfileMapping.

saveProfileMapping(myReqSet,"myProfileMapping.xml")

Tips

  • You can reuse the profile mapping when you import requirements and links from ReqIF files by using the slreq.import function. Specify the profile mapping XML file by using the profileMapping name-value argument.

  • To view the profile mapping, open the requirement set in the Requirements Editor, select the import node, and in the right pane, under ReqIF Profile Mapping, click View Mapping.

    The mouse points to the View Mapping button in the Requirements Editor.

Version History

Introduced in R2023b