Main Content

loadPackage

Class: coder.Dictionary
Package: coder

Load package of code definitions into Embedded Coder Dictionary

Syntax

loadPackage(coderDictionaryObj,pkgName)

Description

loadPackage(coderDictionaryObj,pkgName) loads the code definitions in the package pkgName into the Embedded Coder Dictionary that coderDictionaryObj represents.

Input Arguments

expand all

Embedded Coder Dictionary, specified as a coder.Dictionary object.

Package of code definitions to load into the Embedded Coder Dictionary.

Example: 'Simulink'

Examples

expand all

Open the model rtwdemo_roll and represent the Embedded Coder Dictionary by using a coder.Dictionary object. Assign the coder.Dictionary object to the variable coderDictObj.

rtwdemo_roll
coderDictObj = coder.dictionary.open('rtwdemo_roll');

Load the package mpt into the Embedded Coder Dictionary. You can configure the model to use definitions from the package.

loadPackage(coderDictObj,'mpt')
Introduced in R2019b