Main Content

addComment

Class: slreq.Link
Package: slreq

Add comments to links

Syntax

newComment = addComment(myLink,myComment)

Description

newComment = addComment(myLink,myComment) adds a comment, myComment, to the link myLink.

Input Arguments

expand all

Link, specified as an slreq.Link object.

Comment text to add to the requirement, specified as a string scalar or character vector.

Output Arguments

expand all

New comment data, returned as a structure containing these fields:

Name of the individual or organization who added the comment, returned as a character vector.

Date that the comment was added, returned as a datetime object.

Comment revision number, returned as an int32 object.

Comment text, returned as a character vector.

Examples

expand all

Load the requirement set basicReqSet, which also loads the link set basicReqSet.slmx.

rs = slreq.load("basicReqSet");
myLinkSet = slreq.find(Type="LinkSet");

Get a handle to the link from the link set.

myLink = getLinks(myLinkSet);

Add a comment to the link.

newComment = addComment(myLink,"My new comment.");

Tips

Alternative Functionality

App

You can also add a comment by using the Requirements Editor. Select a link and, in the right pane, under Comments, click Add Comment.

Version History

Introduced in R2018a