tf = moveUp(ref) moves the
referenced requirement ref up one spot in the hierarchy, and returns
1 if the move executes without error.
The referenced requirement ref cannot be moved to a new level in the hierarchy.
Note
You can use this method only in the PostImportFcn callback.
This example shows how to move an imported referenced requirement up and down in the hierarchy in the PostImportFcn callback.
Use slreq.import to import the ReqIF™ file mySpec.reqif into Requirements Toolbox™. Name the imported requirement set myReqSet, register the script myPreImportScript2 as the PreImportFcn, and register the script movePostImport as the PostImportFcn callback to use during import. Return a handle to the requirement set.
The script myPreImportScript2 uses slreq.getCurrentImportOptions to get the import options, then specifies the attribute mapping file to use during import.
The mapping file myMappingFile2.xml maps these attributes from the ReqIF file to these properties in Requirements Toolbox:
ReqSum to Summary
Desc to Description
ID to Custom ID
The script myPostImportScript uses slreq.getCurrentObject to get a handle to the import node, gets the requirement set that the import node belongs to. The script then finds the referenced requirement that has Summary set to Requirement 3 and moves it up. It also finds the referenced requirement that has Summary set to Requirement 1 and moves it down.
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.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.