Contenu principal

setCheckText

Add description of check in Model Advisor analysis results

Description

setCheckText(ftObj,text) is an optional method that inserts descriptive content at the beginning of the report generated by the formatting template object ftObj. Use this method to add explanatory text or a Model Advisor template object that summarizes or describes the overall check.

example

Examples

collapse all

This example shows how to add a summary description at the beginning of a Model Advisor results.

Create a formatting template object.

ft = ModelAdvisor.FormatTemplate("TableTemplate");

Add descriptive text at the beginning of the report.

setCheckText(ft,"This table lists all blocks in the model 'vdp'.");

Set the table title and column titles.

setTableTitle(ft,{"Blocks in Model"});
setColTitles(ft,{"Index","Block Name"});

Open the model and find all blocks.

openExample("vdp")
ans = logical
   1

allBlocks = find_system("vdp");

Add each block to the table.

for idx = 2:length(allBlocks)
    addRow(ft,{idx-1, allBlocks(idx)});
end

Input Arguments

collapse all

ModelAdvisor.FormatTemplate object, specified as a handle to the formatting template.

The information to display at the start of the report. Specify this as either a character vector or string scalar containing descriptive text.

Example: ["Identify unconnected lines","Item 2"]

Version History

Introduced in R2009a