Main Content

Simulink.defaultModelTemplate

Set or get default model template

Description

Simulink.defaultModelTemplate(templatename) sets the template file specified by templatename as the default model template to use for new models. This setting is persistent between Simulink® sessions.

example

templatepath = Simulink.defaultModelTemplate gets the full path to the current default model template.

example

Examples

collapse all

Simulink.defaultModelTemplate('simple_simulation.sltx')
mydefaulttemplate = Simulink.defaultModelTemplate

Input Arguments

collapse all

Template file name, specified as a character vector. If the template is not on the MATLAB® path, specify the fully qualified path to the template file and *.sltx extension.

Example: \\Home\username\Documents\MATLAB\template.sltx

Data Types: char

Output Arguments

collapse all

Template path, returned as a character vector that shows the full path to the current default model template.

Version History

Introduced in R2016b