Contenuto principale

setListObj

Add list of hyperlinks to model objects in Model Advisor analysis results

Description

setListObj(ftObj,modelObj) is an optional method that generates a bulleted list of hyperlinks to model objects in the report created by the Model Advisor formatting object ftObj. The modelObj input specifies the list items as a cell array of handles or full paths to blocks or model objects.

example

Examples

collapse all

This example shows how to add a bulleted list of hyperlinks in Model Advisor results.

Create a formatting template object.

ft = ModelAdvisor.FormatTemplate("ListTemplate");

Open the vdp model.

open_system("vdp");

Locate all blocks in the model.

allBlocks = find_system("vdp","Type","block");

Add Block Paths as Hyperlinks to the List Template. Each block path appears as a clickable hyperlink in the Model Advisor report. Clicking a hyperlink highlights the corresponding block in the model.

setListObj(ft,allBlocks);

Display the result of hyperlinked blocks.

ResultDescription = {};
ResultDescription{end+1} = ft;

disp("Blocks added as hyperlinks in the list template:");
Blocks added as hyperlinks in the list template:
disp(allBlocks);
    {'vdp/Callback Button'}
    {'vdp/Constant'       }
    {'vdp/Mu'             }
    {'vdp/Product'        }
    {'vdp/Scope'          }
    {'vdp/Square'         }
    {'vdp/Sum'            }
    {'vdp/Sum1'           }
    {'vdp/x1'             }
    {'vdp/x2'             }
    {'vdp/Out1'           }
    {'vdp/Out2'           }

Input Arguments

collapse all

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

Model objects to display as a bulleted list of hyperlinks, specified as a cell array of block handles, full path names (character vectors), or model object handles. The order of the items in the cell array determines the order in which the hyperlinks appear in the list.

Example: {"vdp/Gain","vdp/Sum"}

Version History

Introduced in R2009a