Main Content

rmiref.removeRefs

Remove backlinks to models from requirements documents

Description

count = rmiref.removeRefs(doc_type) removes all backlinks to models from the currently active external requirements document of type doc_type, and returns the number of backlinks removed. For more information about backlinks, see Manage Navigation Backlinks in External Requirements Documents.

Note

You can only remove backlinks from one external document at a time.

example

Examples

collapse all

This example shows how to remove backlinks from a Microsoft® Word document.

Open the Redirect Direct Links to Imported Requirements Programmatically example.

openExample(['slrequirements/' ...
    'RedirectDirectLinksToImportedRequirementsByAPIExample'])

Open the FuelSysWithReqLinks model.

open_system("FuelSysWithReqLinks.slx")

The model contains direct links to these documents:

  • FuelSysDesignDescription.docx

  • FuelSysRequirementsSpecification.docx

  • FuelSysTestScenarios.xlsx

Open the FuelSysDesignDescription.docx document.

open("FuelSysDesignDescription.docx")

Remove the backlinks from the FuelSysDesignDescription.docx document.

count = rmiref.removeRefs("word")
Removing Simulink references from the current document ...

Current document: fuelsysdesigndescription.docx

Total references: 6

Remove all Simulink references? y/n
y
Removing ...

count =

     6

Clear the open requirement sets and link sets. Close all open models.

slreq.clear;
bdclose all;

Input Arguments

collapse all

External requirements document type, specified as "Word", "Excel", or "DOORS".

Note

The document type "DOORS" refers to IBM® DOORS® modules. You cannot use this function to remove backlinks from IBM DOORS Next modules.

Output Arguments

collapse all

Number of backlinks removed from the external document, returned as a double.

Version History

Introduced in R2011a