Main Content

rmiref.insertRefs

(Not recommended) Insert backlinks in Microsoft Office documents

    Using rmiref.insertRefs is not recommended. Use updateBacklinks instead.

    Description

    example

    [links,matches,inserted] = rmiref.insertRefs(model,type) inserts navigation backlinks in the active document of type type to match slreq.Link objects that point from the document to the Simulink® model model. You can use these backlinks to navigate from the external document to the Simulink model. The function returns the number of links associated with the model, the number of those links that also point to the external requirements document, and the number of backlinks inserted in the requirements document. For more information, see Manage Navigation Backlinks in External Requirements Documents.

    Examples

    collapse all

    This example shows how to insert backlinks in a Microsoft® Word document.

    Open a model called myModel.

    open_system("myModel");

    Open a Microsoft® Word document that contains requirements called myRequirementsDoc.docx

    open("myRequirementsDoc.docx");

    Insert navigation backlinks in the document for the model myModel. Return the total number of links associated with the model, the number of links that navigate to the document, and the number of links inserted in the document.

    [links,matches,inserted] = rmiref.insertRefs("myModel","word")
    links = 16
    matches = 8
    inserted = 8

    Input Arguments

    collapse all

    Name or handle of a Simulink model, specified as a string scalar, character vector, or model handle.

    External requirements document type, specified as "word" or "excel".

    Output Arguments

    collapse all

    Number of links associated with the Simulink model, returned as a double array.

    Number of links in the Simulink model that are associated with the external requirements document, returned as a double array.

    Number of backlinks inserted in the external requirements document, returned as a double array.

    Version History

    Introduced in R2011a

    expand all