Main Content

removeReference

Remove Simulink data dictionary reference of another Simulink data dictionary

Since R2023b

    Description

    example

    removeReference(archDataObj,refDict) removes a Simulink® data dictionary reference, specified as refDict, from archDataObj, the Architectural Data section of a data dictionary.

    Examples

    collapse all

    Remove referenced dictionaries ReferenceInterfaces1.sldd and ReferenceInterfaces2.sldd from the Architectural Data section of 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.

    Get the names of the referenced dictionaries.

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

    Remove the referenced dictionaries, using the Architectural Data object or character vector representing the referenced data dictionary.

    refArchDataObj = Simulink.dictionary.archdata.open("ReferenceInterfaces1.sldd");
    removeReference(archDataObj,refArchDataObj);
    removeReference(archDataObj,"ReferenceInterfaces2.sldd");
    
    refDicts = getReferences(archDataObj)
    refDicts =
    
      0×1 empty cell array

    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