Main Content

removeReference

別の Simulink データ ディクショナリの Simulink データ ディクショナリ参照を削除する

R2023b 以降

    説明

    removeReference(archDataObj,refDict) は、refDict として指定された Simulink® データ ディクショナリ参照をデータ ディクショナリの [アーキテクチャ データ] セクション archDataObj から削除します。

    すべて折りたたむ

    参照ディクショナリ ReferenceInterfaces1.sldd および ReferenceInterfaces2.sldd をデータ ディクショナリ MyInterfaces.sldd の [アーキテクチャ データ] セクションから削除します。関連する関数のワークフローの詳細を示す例については、Create Architectural Data Object and Use It to Configure Architectural Dataを参照してください。

    参照ディクショナリの名前を取得します。

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

    参照データ ディクショナリを表すアーキテクチャ データ オブジェクトまたは文字ベクトルを使用して、参照ディクショナリを削除します。

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

    入力引数

    すべて折りたたむ

    アーキテクチャ データ オブジェクト。Simulink.dictionary.ArchitecturalData オブジェクトとして指定します。

    参照データ ディクショナリ。文字ベクトル、string スカラー、または Simulink.dictionary.ArchitecturalData オブジェクトとして指定します。

    例: "ReferenceDictionary.sldd"

    バージョン履歴

    R2023b で導入