Create Simulink object properties reporter template


template =,type)
output_args = createTemplate(input_args,Name,Value)


template =,type) creates a copy of the default Simulink® object properties template specified by type at the location specified by templatePath. To design a custom Simulink object properties template for your report, use the copied template as a starting point t.

output_args = createTemplate(input_args,Name,Value) <verb phase> with additional options specified by one or more Name,Value pair arguments.

Input Arguments

expand all

Path and file name of the new template, specified as a character vector or string scalar.

Type of template, specified as 'html', 'html-file', 'docx', or 'pdf'.

Output Arguments

expand all

Path and file name of the copy of the template, returned as a string scalar. The file name extension of the template is assigned based on the specified output type. For example, if type is 'pdf', the file name extension is .pdftx.


Create a Report Template

Before you run this example, create a copy of the default HTML Simulink object properties template in the mytemplates folder. Name the copied template myObjectsReporter.htmtx. Edit the template as desired. To use the new template, assign its path to the TemplateSrc property.

rpt ='My Report','html');
model_name = 'vdp');

chapter = Chapter(model_name);
chart = block2chart('sf_car/shift_logic');
rptr = SimulinkObjectProperties(model_name);
template = SimulinkObjectProperties.createTemplate...
rptr.TemplateSrc = template;

Introduced in R2017b