Main Content

getExternalTypeName

Class: slreq.Reference
Namespace: slreq

Get requirement type name from external artifact

Since R2023a

Description

example

name = getExternalTypeName(ref) returns the requirement type name from the external artifact that the referenced requirement ref was imported from. Use this method to get the external requirement type name for requirements imported from IBM® DOORS® Next or from ReqIF™ files.

Input Arguments

expand all

Referenced requirement, specified as a slreq.Reference object.

Output Arguments

expand all

External requirement type name, returned as a character vector.

Examples

expand all

This example shows how to get the requirement type name for a referenced requirement that was imported from a ReqIF® file.

Load the mySpec requirement set, which was imported from the file mySpec.reqif.

rs = slreq.load("mySpec.slreqx");

Get a handle to the import node.

topRef = children(rs);

Get the child referenced requirements of the import node.

refs = children(topRef);

Get a handle to the first referenced requirement.

ref = refs(1);

Get the external type name of the referenced requirement.

name = getExternalTypeName(ref)
name = 
'Functional Requirement'

Version History

Introduced in R2023a