Main Content

removeProfile

Class: slreq.LinkSet
Namespace: slreq

Remove profile from link set

Since R2022b

Syntax

tf = removeProfile(myLinkSet,fileName)

Description

tf = removeProfile(myLinkSet,fileName) removes the profile, fileName, from the link set myLinkSet.

Note

If you remove a profile, Requirements Toolbox™ applies these changes to links that used a stereotype from the profile:

  • Sets the link type to Relate

  • Removes the stereotype properties and deletes the stereotype property values

Input Arguments

expand all

Link set, specified as an slreq.LinkSet object.

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

Example: "myProfile.xml"

Output Arguments

expand all

Remove success status, returned as a 1 or 0 of data type logical.

Examples

expand all

This example shows how to get the profiles assigned to a link set and how to remove a profile.

Load the myAddRequirements requirement set, which also loads the myAddProfile link set.

rs = slreq.load("myAddRequirements");

Find the myAddProfile link set.

myLinkSet = slreq.find(Type="LinkSet",Description="myAdd");

Get the profiles assigned to the link set.

fileName = profiles(myLinkSet)
fileName = 1x1 cell array
    {'myAddLinksProfile.xml'}

Remove the profile from the link set.

tf = removeProfile(myLinkSet,fileName{1})
tf = logical
   1

Tips

  • To remove profiles from requirement sets, use the removeProfile method of slreq.ReqSet.

Version History

Introduced in R2022b