Main Content

addFilterToHighlight

Add highlighting to traceability matrix configuration

Since R2024a

    Description

    example

    addFilterToHighlight(configuration,filter) adds highlighting to the traceability matrix by applying the highlight filter, filter, to the traceability matrix configuration, configuration.

    Examples

    collapse all

    This example shows how to highlight items in a traceability matrix by adding filters to a saved traceability matrix view.

    Open the project and get the traceability matrix configuration from the matrix options.

    openProject("CruiseRequirementsExample");
    view = slreq.getTraceabilityMatrixOptions("data\crs_req_tm_view.json");
    configuration = view.options;

    Create a highlight filter for missing links and add the filter to the configuration.

    noLinkFilter = slreq.matrix.Filter;
    noLinkFilter.Group ="Highlight";
    noLinkFilter.Type ="HasNoLink";
    addFilterToHighlight(configuration,noLinkFilter);

    Generate the updated traceability matrix.

    slreq.generateTraceabilityMatrix(view);

    Clear and close the Requirements Editor.

    slreq.clear

    Input Arguments

    collapse all

    Traceability matrix configuration to add filter to, specified as an slreq.matrix.Configuration object.

    Traceability matrix filter to add to configuration, specified as an slreq.matrix.Filter object.

    Version History

    Introduced in R2024a