slreq.generateTraceabilityDiagram
Create a traceability diagram
Description
slreq.generateTraceabilityDiagram(
creates a traceability diagram that originates from startingItem
)startingItem
. If a
traceability diagram is already open for the specified item, the diagram comes to the foreground.
Note
If you create a diagram from a link, the link source
is the starting node. Similarly, if you create a diagram from a link
set, the artifact specified by the Artifact
is the starting node.
Examples
Create a Traceability Diagram from a Requirement
This example shows how to create a traceability diagram from a requirement object.
Open the Requirements Definition for a Cruise Control Model project. Load the crs_req_func_spec
requirment set.
slreqCCProjectStart;
slreq.load("crs_req_func_spec");
Find the Enable Switch Detection
requirement.
req = slreq.find(Type="Requirement",Summary="Enable Switch Detection")
req = Requirement with properties: Type: 'Functional' Id: '#9' Summary: 'Enable Switch Detection' Description: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">...' Keywords: {} Rationale: '' CreatedOn: 27-Feb-2017 10:15:38 CreatedBy: 'itoy' ModifiedBy: 'asriram' IndexEnabled: 1 IndexNumber: [] SID: 9 FileRevision: 55 ModifiedOn: 03-Aug-2017 14:39:35 Dirty: 0 Comments: [0x0 struct] Index: '1.6'
Create a traceability diagram for the Enable Switch Detection
requirement.
slreq.generateTraceabilityDiagram(req)
Cleanup
Clear the open requirement sets and link sets. Close the current project.
slreq.clear; close(currentProject);
Create a Traceability Diagram from a Link
This example shows how to create a traceability diagram from a link object.
Open the Requirements Definition for a Cruise Control Model project. Load the crs_req
requirement set, which also loads the crs_req
link set.
slreqCCProjectStart;
slreq.load("crs_req");
Find the crs_req
link set. Then find the link with description #9: Enable Switch Detection
.
myLinkSet = slreq.find(Type="LinkSet",Name="crs_req"); myLink = find(myLinkSet,Type="Link",Description="#9: Enable Switch Detection")
myLink = Link with properties: Type: 'Derive' Description: '#9: Enable Switch Detection' Keywords: {} Rationale: '' CreatedOn: 20-May-2017 13:14:10 CreatedBy: 'itoy' ModifiedOn: 02-Feb-2018 14:28:04 ModifiedBy: 'itoy' Revision: 4 SID: 1 Comments: [0x0 struct]
Create a traceability diagram from the link.
slreq.generateTraceabilityDiagram(myLink)
Cleanup
Clear the open requirement sets and link sets. Close the current project.
slreq.clear; close(currentProject);
Create a Traceability Diagram from a Requirement Set
This example shows how to create a traceability diagram from a requirement set.
Open the Requirements Definition for a Cruise Control Model project. Load the crs_req_func_spec
requirement set.
slreqCCProjectStart;
rs = slreq.load("crs_req_func_spec");
Create a traceability diagram for the crs_req_func_spec
requirement set by using the relative file path.
relpath = fullfile("documents","crs_req_func_spec.slreqx")
relpath = "documents/crs_req_func_spec.slreqx"
slreq.generateTraceabilityDiagram(relpath)
Cleanup
Clear the open requirement sets and link sets. Close the current project.
slreq.clear; close(currentProject);
Create a Traceability Diagram from a Link Set
This example shows how to create a traceability diagram from a link set.
Open the Requirements Definition for a Cruise Control Model project. Load the crs_req
link set.
slreqCCProjectStart;
ls = slreq.load("crs_req.slmx");
Create a traceability diagram for the crs_req
link set by using the relative file path.
relpath = fullfile("documents","crs_req.slmx")
relpath = "documents/crs_req.slmx"
slreq.generateTraceabilityDiagram(relpath)
Cleanup
Clear the open requirement sets and link sets. Close the current project.
slreq.clear; close(currentProject);
Input Arguments
startingItem
— Starting item for diagram
slreq.Requirement
object | slreq.Reference
object | slreq.Justification
object | slreq.Link
object | slreq.ReqSet
object | slreq.LinkSet
object | string scalar | character vector
Starting item to create the traceability diagram from, specified as a:
slreq.Requirement
objectslreq.Reference
objectslreq.Justification
objectslreq.Link
objectslreq.ReqSet
objectslreq.LinkSet
objectString scalar or character vector that contains the short name, relative file path, or full file path for a requirement set or link set
Version History
Beispiel öffnen
Sie haben eine geänderte Version dieses Beispiels. Möchten Sie dieses Beispiel mit Ihren Änderungen öffnen?
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)