Main Content

slreq.LinkSet class

Package: slreq
Superclasses:

Work with link sets

Description

Instances of slreq.LinkSet are Link Set objects. Links are organized in Link Sets. Each Link Set is associated with a source artifact such as a Simulink® model or a data dictionary and is serialized into a separate file which stores the links associated with it. The default location and name of the Link set file matches that of the source artifact.

Construction

allLinkSets = slreq.find('Type', 'LinkSet') finds and returns an array of loaded slreq.LinkSet objects allLinkSets.

myLinkSet = slreq.find('Type', 'LinkSet', 'Name', ArtifactName) finds and returns an slreq.LinkSet object myLinkSet matching the artifact name specified by ArtifactName.

myLinkSet = slreq.load(ArtifactName) loads an slreq.LinkSet object myLinkSet matching the artifact name specified by ArtifactName.

Input Arguments

expand all

The name of the link set artifact, specified as a character vector.

Output Arguments

expand all

Array of loaded link sets.

Link set, returned as an slreq.LinkSet object.

Properties

expand all

The file path of the link set, specified as a character vector.

Top-level container identifier, such as a Microsoft® Office document name, an IBM® Rational® DOORS® Module unique ID, Simulink model name, or Simulink Test™ Test Manager file name.

The custom link type of the links in the link set. For more information, see Custom Link Types.

Example: linktype_rmi_excel, linktype_rmi_doors

Link set revision number, specified as a scalar.

Indicates if the link set has unsaved changes. 0 for no unsaved changes and 1 for unsaved changes.

Link set description text, specified as a character vector.

Link set custom attribute names, specified as a cell array of character vectors.

Methods

addAttributeAdd custom attribute to link set
deleteAttributeDelete custom attribute from link set
findFind links in link set with matching attribute values
getLinksGet links from link set
inspectAttributeGet information about link set custom attribute
save Save link set
sources Get link sources
updateAttributeUpdate information for link set custom attribute

Examples

% Find a link set
myLinkSet1 = slreq.find('Type', 'LinkSet', 'Name', 'Project_req')

myLinkSet1 = 

  LinkSet with properties:

    Description: ''
       Filename: 'Project_req.slmx'
       Artifact: 'Project_req.slreqx'
         Domain: 'linktype_rmi_slreq'
       Revision: 2
          Dirty: 0

myLinkSet2 = slreq.load('fuelsys.slx')

myLinkset2 = 

  LinkSet with properties:

    Description: ''
       Filename: 'C:\MATLAB\My_Files\fuelsys_linkset.slmx'
       Artifact: 'D:\Work\Design_Specs\fuelsys.slx'
         Domain: 'linktype_rmi_simulink'
       Revision: 2
          Dirty: 0 

% Set the link set description
myLinkset2.Description = 'Link set for the fuel system'

myLinkset2 = 

  LinkSet with properties:

    Description: 'Link set for the fuel system'
       Filename: 'C:\MATLAB\My_Files\fuelsys_linkset.slmx'
       Artifact: 'D:\Work\Design_Specs\fuelsys.slx'
         Domain: 'linktype_rmi_simulink'
       Revision: 2
          Dirty: 1 
Introduced in R2018a