Main Content

slreq.cmConfigureVersion

Set configured version of linked requirements documents

Description

prev_version = slreq.cmConfigureVersion(domain,docid,version) specifies the baseline version, version, of the linked requirements document docid of the document interface type domain. The function returns the value of the previously configured version.

Use this function to specify the version of the linked requirements document that MATLAB® opens. You can use this function to configure the linked version for IBM® DOORS® baseline modules or version-controlled documents that use a custom document interface. For custom interfaces, use the slreq.cmGetVersion function in the navigation callback to identify the version your callback accesses. For more information on creating custom interface types, see Define Custom Document Interface for Direct Linking to Requirements.

example

prev_version = slreq.cmConfigureVersion(domain,docid,version,src) specifies the version of the external requirements document that opens when you navigate to it from links that link to the source artifact src.

example

Examples

collapse all

Set the configured version to 2.1b for the links to the IBM DOORS module 546223g1.

versionA = slreq.cmConfigureVersion("linktype_rmi_doors", ...
    "546223g1","2.1b")
versionA = 

  0×0 empty char array 

versionA is empty because there is no previously configured version.

Set the configured version to 2.2b.

versionB = slreq.cmConfigureVersion("linktype_rmi_doors", ...
    "546223g1","2.2b")
versionB =

  '2.1b'

The previously set configured version is 2.1b.

Set the configured version to 2.1b for the links from the Simulink® model myModel.slx to the IBM DOORS module 00006a12.

% 
versionA = slreq.cmConfigureVersion("linktype_rmi_doors", ...
    "00006a12","2.1b","myModel.slx")
versionA = 

  0×0 empty char array 

versionA is empty because there is no previously configured version.

Set the configured version to 2.3b.

versionB = slreq.cmConfigureVersion("linktype_rmi_doors", ...
    "00006a12","2.3b","myModel.slx")
versionB =

  '2.1b'

The previously set configured version is 2.1b.

Input Arguments

collapse all

Registered document interface type, specified as "linktype_rmi_doors" for the interface to IBM DOORS modules, or a character vector or string scalar that specifies a custom document interface label.

Data Types: char | string

Unique identifier for the version-controlled requirements document, specified as a character vector or a string scalar.

Data Types: char | string

Target version of the requirements document, specified as a character vector or a string scalar. Enter an empty string to set the configured version to the current version and restore the default navigation behavior.

Data Types: char | string

File name of the Model-Based Design source artifact, specified as a character vector or a string scalar.

Data Types: char | string

Output Arguments

collapse all

Previously configured version of the linked requirements document, returned as a character vector. The function returns an empty character vector if the configured version is the current version, or if there is no configured version.

Algorithms

slreq.cmConfigureVersion stores the linked version configuration depending on the syntax you use:

  • If you do not specify the link source artifact, src, the function stores the configured version number in your user preferences folder.

  • If you specify src, the function stores the configured version number in the link set.

Version History

Introduced in R2019b