Main Content

slreportgen.report.FunctionReference.createTemplate

Class: slreportgen.report.FunctionReference
Package: slreportgen.report

Copy template file for slreportgen.report.FunctionReference class

Since R2022a

Syntax

copiedFilePath = slreportgen.report.FunctionReference.createTemplate(targetPath,templateType)

Description

copiedFilePath = slreportgen.report.FunctionReference.createTemplate(targetPath,templateType) creates a copy of the default template file, of the specified type, for objects of the slreportgen.report.FunctionReference class in the folder specified by targetPath. Use the template copy as a starting point for creating your custom template.

Input Arguments

expand all

Target path for copy of template file, specified as a character vector or string scalar. If you specify targetPath without the file extension, the method creates the file with the extension of the copied template file. If you include the file extension, it must match the extension of the copied template file.

Data Types: char | string

Type of template to copy, specified as "html", "html-file", "docx", or "pdf".

Data Types: char | string

Output Arguments

expand all

Path of the created file, returned as a string scalar.

Data Types: string

Examples

expand all

This example shows how to copy the default PDF template for a function reference reporter.

copiedFilePath = ...
    slreportgen.report.FunctionReference.createTemplate(...
                            "d:\myTemplates\PDF_Template","pdf")

The output of the command shows the path of the copied template file.

copiedFilePath = 

    "d:\myTemplates\PDF_Template.pdftx"

Version History

Introduced in R2022a