Main Content

addReference

Add Simulink interface dictionary reference to another interface dictionary

Since R2023a

In R2023b the Architectural Data section of data dictionaries was introduced. When managing interfaces, data types, constants, and software address methods consider using the Simulink.dictionary.ArchitecturalData programmatic interfaces instead. For more information, see Programmatically Manage AUTOSAR Architectural Data.

Description

addReference(dictObj,refDict) adds a referenced dictionary, specified by refDict, to the specified interface dictionary, dictObj. Dictionary referencing is supported for Simulink® interface dictionaries that do not have applied platform mappings.

example

Examples

collapse all

Add referenced dictionaries ReferenceInterfaces1.sldd and ReferenceInterfaces2.sldd to the interface dictionary MyInterfaces.sldd.

dictAPI1 = Simulink.interface.dictionary.open('MyInterfaces.sldd');
dictAPI2 = Simulink.interface.dictionary.open('ReferenceInterfaces1.sldd');
addReference(dictAPI1,dictAPI2);
addReference(dictAPI1,'ReferenceInterfaces2.sldd');

refDicts = getReferences(dictAPI1)
refDicts =

  2×1 cell array

    {'C:\work\ReferenceInterfaces1.sldd'}
    {'C:\work\ReferenceInterfaces2.sldd'}

Input Arguments

collapse all

Interface dictionary, specified as a Simulink.interface.Dictionary object. Before you use this function, Before you use this function, create or open dictObj by using Simulink.interface.dictionary.create or Simulink.interface.dictionary.open.

Referenced interface dictionary, specified as a character vector, a string scalar, or a Simulink.interface.Dictionary object.

Example: 'ReferenceDictionary.sldd'

Version History

Introduced in R2023a

collapse all

R2023b: Simulink.interface.Dictionary object replaced by Simulink.dictionary.ArchitecturalData object

Starting in R2023b, use the Simulink.dictionary.ArchitecturalData object to programmatically manage architectural data instead of the Simulink.interface.Dictionary object.

Go to top of page