Main Content

getLoadedPackages

Class: coder.Dictionary
Namespace: coder

Return code definition packages loaded into Embedded Coder Dictionary

Since R2024a

Syntax

packages = getLoadedPackages(coderDictionaryObj)

Description

packages = getLoadedPackages(coderDictionaryObj) lists packages loaded into the Embedded Coder Dictionary that coderDictionaryObj represents.

Input Arguments

expand all

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

Output Arguments

expand all

Packages loaded into the Embedded Coder Dictionary, returned as an array of strings.

Examples

expand all

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

openExample('RollAxisAutopilot')
coderDictObj = coder.dictionary.open('RollAxisAutopilot');

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

loadPackage(coderDictObj,'mpt')

List the packages loaded into the Embedded Coder Dictionary.

getLoadedPackages(coderDictObj)
ans = 

  1×2 string array

    "Simulink"    "mpt"

Version History

Introduced in R2024a