Main Content

set

Class: coder.dictionary.Entry
Package: coder.dictionary

Set value of code definition property

Syntax

set(entryObj,Name1,Value1,...,NameN,ValueN)

Description

set(entryObj,Name1,Value1,...,NameN,ValueN) sets the properties to the specified values for the Embedded Coder Dictionary definition that entryObj represents.

Input Arguments

expand all

Embedded Coder Dictionary entry that represents the code definition, specified as a coder.dictionary.Entry object. Before you use this function, represent the code definition by using a coder.dictionary.Entry object. Use, for example, the addEntry function.

Property specifications for the definition, specified as one or more name-value pairs representing names and values of properties of the code definition. For a list of the properties of an Embedded Coder Dictionary definition, see coder.dictionary.Entry.

Example: 'MemorySection','memSect1'

Example: 'DataScope','Exported'

Examples

expand all

Open the model rtwdemo_roll and represent the Embedded Coder Dictionary by using a coder.Dictionary object. Use this object to access the Storage Classes section of the dictionary and represent the section by using a coder.dictionary.Section object.

rtwdemo_roll
coderDictionary = coder.dictionary.open('rtwdemo_roll');
storageClassesSect = getSection(coderDictionary, 'StorageClasses');

Represent the example storage class ParamStruct by using a coder.dictionary.Entry object.

entryObj = getEntry(storageClassesSect,'ParamStruct');

Change the value of the HeaderFile property of the storage class definition from $N.h to $N_params.h.

set(entryObj,'HeaderFile','$N_params.h')
Introduced in R2019b