Main Content

addReference

Add data dictionary reference to Architectural Data section of Simulink data dictionary

Since R2023b

    Description

    example

    addReference(archDataObj,refDict) adds a referenced dictionary, specified by refDict, to the Architectural Data section of the specified data dictionary, archDataObj. Dictionary referencing is supported only for data dictionaries that do not have applied platform mappings.

    Examples

    collapse all

    Add referenced dictionaries ReferenceInterfaces1.sldd and ReferencesInterfaces2.sldd to the data dictionary MyInterfaces.sldd.For an example that shows more of the workflow for related functions, see Create Architectural Data Object and Use It to Configure Architectural Data.

    archDataObj1 = Simulink.dictionary.archdata.open("MyInterfaces.sldd");
    archDataObj2 = Simulink.dictionary.archdata.open("ReferenceInterfaces1.sldd");
    addReference(archDataObj1,archDataObj2);
    addReference(archDataObj1,"ReferenceInterfaces2.sldd");
    
    refDicts = getReferences(archDataObj1)
    refDicts =
    
      2×1 cell array
    
        {'C:\work\ReferenceInterfaces1.sldd'}
        {'C:\work\ReferenceInterfaces2.sldd'}

    Input Arguments

    collapse all

    Architectural Data object specified as a Simulink.dictionary.ArchitecturalData object.

    Referenced data dictionary, specified as a character vector, a string scalar, or a Simulink.dictionary.ArchitecturalData object.

    Example: "ReferenceDictionary.sldd"

    Version History

    Introduced in R2023b