Main Content

rmitag

Manage user keywords for requirements links

Syntax

rmitag(model, 'list')
rmitag(model, 'add', keyword)
rmitag(model, 'add', keyword, doc_pattern)
rmitag(model, 'delete', keyword)
rmitag(model, 'delete', keyword, doc_pattern)
rmitag(model, 'replace', keyword, new_keyword)
rmitag(model, 'replace', keyword, new_keyword, doc_pattern)
rmitag(model, 'clear', keyword)
rmitag(model, 'clear', keyword, doc_pattern)

Description

rmitag(model, 'list') lists all user keywords in model.

rmitag(model, 'add', keyword) adds keyword as a user keyword for all requirements links in model.

rmitag(model, 'add', keyword, doc_pattern) adds keyword as a user keyword for all links in model, where the full or partial document name matches the regular expression doc_pattern.

rmitag(model, 'delete', keyword) removes the user keyword, keyword from all requirements links in model.

rmitag(model, 'delete', keyword, doc_pattern) removes the user keyword, keyword, from all requirements links in model, where the full or partial document name matches doc_pattern.

rmitag(model, 'replace', keyword, new_keyword) replaces keyword with new_keyword for all requirements links in model.

rmitag(model, 'replace', keyword, new_keyword, doc_pattern) replaces keyword with new_keyword for links in model, where the full or partial document name matches the regular expression doc_pattern.

rmitag(model, 'clear', keyword) deletes all requirements links that have the user keyword, keyword.

rmitag(model, 'clear', keyword, doc_pattern) deletes all requirements links that have the user keyword, keyword, and link to the full or partial document name specified in doc_pattern.

Input Arguments

model

Name of or handle to Simulink® or Stateflow® model with which requirements are associated.

keyword

Character vector specifying user keyword for requirements links.

doc_pattern

Regular expression to match in the linked requirements document name. Not case sensitive.

new_keyword

Character vector that indicates the name of a user keyword for a requirements link. Use this argument when replacing an existing user keyword with a new user keyword.

Examples

Open the slvnvdemo_fuelsys_officereq example model, and add the user keyword tmptag to all objects with requirements links:

open_system('slvnvdemo_fuelsys_officereq');
rmitag(gcs, 'add', 'tmptag');

Remove the user keyword test from all requirements links:

open_system('slvnvdemo_fuelsys_officereq');
rmitag(gcs, 'delete', 'test');

Delete all requirements links that have the user keyword design:

open_system('slvnvdemo_fuelsys_officereq');
rmitag(gcs, 'clear', 'design');

Change all instances of the user keyword tmptag to safety requirement, where the document file name extension is .docx:

open_system('slvnvdemo_fuelsys_officereq');
rmitag(gcs, 'replace', 'tmptag', ...
       'safety requirements', '\.docx');

Version History

Introduced in R2010a