slreq.View.getViews
Description
Examples
Get and Delete View from Requirements Editor
This example shows how to import a view settings file, get the available views for the Requirements Editor and Requirements Perspective, and delete a view.
Open the myAddRequirements
requirement set.
rs = slreq.open("myAddRequirements");
Load the view settings file, ViewFile.mat
, which contains views that filter the Requirements Editor and Requirements Perspective.
slreq.importViewSettings("ViewFile.mat")
Get the available views.
views = slreq.View.getViews
views=1×2 View array with properties:
Name
ReqFilter
LinkFilter
Host
Display the views and their properties.
views(1)
ans = View with properties: Name: 'default view' ReqFilter: '' LinkFilter: '' Host: ''
views(2)
ans = View with properties: Name: 'ReqView' ReqFilter: '{'ReqType',' LinkFilter: '' Host: ''
Apply the view ReqView
.
activate(views(2))
The view ReqView
has a requirement filter with an incomplete syntax.
Get the error that the software returned when it applied the view.
msg = getErrorMessage(views(2))
msg = struct with fields:
requirement: 'Error parsing Requirements view filter: Error: This statement is incomplete.'
link: ''
Apply the default view to the Requirements Editor and Requirements Perspective.
slreq.View.activateDefaultView
Delete the view ReqView
.
deletedView = delete(views(2))
deletedView = View with no properties.
Output Arguments
views
— View settings
slreq.View
array
View settings, returned as an slreq.View
array.
Version History
Introduced in R2022b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)