slreq.getCurrentObject
Get selected objects in Requirements Editor, Requirements Browser, or Requirements Table block
Since R2021a
Description
returns the
currently selected item or items in the Requirements Editor or Requirements
Browser, or the currently selected requirement in a Requirements Table block.myReqObj
= slreq.getCurrentObject
Note
If you select an item and then select an item or group of items in a different window or block, the function returns the most recently selected item or group of items.
Examples
Output Arguments
Tips
If you execute this function during Requirements Toolbox callbacks, the function returns the target of the callback:
PreImportFcn
— Returns empty when you are importing requirements. Returns a handle to the Import node when you are updating requirements.PostImportFcn
— Returns a handle to the Import node. If you are importing multiple specifications from a ReqIF™ file, the function returns an array of Import nodes. For more information, see Import Requirements from ReqIF Files.PostLoadFcn
— Returns a handle to the requirement set.PreSaveFcn
— Returns a handle to the requirement set.
For more information, see Use Callbacks to Customize Requirement Import Behavior and Execute Code When Loading and Saving Requirement Sets.
Version History
Introduced in R2021a