Main Content

refreshPackage

Class: coder.Dictionary
Package: coder

Refresh package definitions in Embedded Coder Dictionary

Syntax

refreshPackage(coderDictionaryObj)

Description

refreshPackage(coderDictionaryObj) refreshes code definitions stored in packages, which you create and modify by using the Custom Storage Class Designer. You do not need to refresh code definitions that you create in the Embedded Coder Dictionary. The refreshPackage function unloads and reloads the packages that the Embedded Coder Dictionary represented by coderDictionaryObj refers to. When you change the code definitions in a package, use refreshPackage to reload the package in each Embedded Coder Dictionary that refers to the package.

Input Arguments

expand all

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

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');

Refresh the packages in the Embedded Coder Dictionary. If you changed definitions in the packages, the changes now appear in the Embedded Coder Dictionary.

refreshPackage(coderDictObj)
Introduced in R2019b