Main Content

show

View architectural data of Simulink data dictionary in Architectural Data Editor

Since R2023b

    Description

    show(objName) opens the architectural data object or element and displays the object in the Architectural Data Editor.

    example

    Examples

    collapse all

    To view the architectural data of a Simulink® data dictionary in the Architectural Data Editor, use the show function. For an example that shows more of the workflow for related functions, see Create Architectural Data Object and Use It to Configure Architectural Data.

    show(archDataObj);

    Architectural data editor showing contents of the Simulink data dictionary MyInterfaces.sldd.

    This example shows how to view a data interface in the Architectural Data Editor.

    Create a Simulink.dictionary.ArchitecturalData object by opening an existing data dictionary.

    archDataObj = Simulink.dictionary.archdata.open("myInterfaceDict.sldd")
    archDataObj = 
    
      ArchitecturalData with properties:
    
        DictionaryFileName: 'myInterfaceDict.sldd'
                Interfaces: [1×1 Simulink.dictionary.archdata.DataInterface]
                 DataTypes: [0×0 Simulink.dictionary.archdata.DataType]
                 Constants: [0×0 Simulink.dictionary.archdata.Constant]

    Create an interface object of the specified data interface.

    interfaceObj = getInterface(archDataObj,"DataInterface")
    interfaceObj = 
    
      DataInterface with properties:
    
               Name: 'DataInterface'
        Description: ''
           Elements: [1×3 Simulink.dictionary.archdata.DataElement]
              Owner: [1×1 Simulink.dictionary.ArchitecturalData]

    Use the show function to display the data interface in the Architectural Data Editor.

    show(dataInterfaceObj)

    Architectural Data Editor window, displays the Interfaces tab. The Data Interface and its three data elements are visible in the Main Contents pane.

    This example shows how to view a data element in the Architectural Data Editor.

    Create a Simulink.dictionary.ArchitecturalData object by opening an existing data dictionary.

    archDataObj = Simulink.dictionary.archdata.open("myInterfaces.sldd")
    archDataObj = 
    
      ArchitecturalData with properties:
    
        DictionaryFileName: 'myInterfaces.sldd'
                Interfaces: [1×1 Simulink.dictionary.archdata.DataInterface]
                 DataTypes: [0×0 Simulink.dictionary.archdata.DataType]
                 Constants: [0×0 Simulink.dictionary.archdata.Constant]

    Use the getElement function to access a data element.

    dataElem1 = getElement(interfaceObj,"element1")
    dataElem1 = 
    
      DataElement with properties:
    
               Name: 'element1'
               Type: [1×1 Simulink.dictionary.archdata.ValueType]
        Description: ''
         Dimensions: '1'
              Owner: [1×1 Simulink.dictionary.archdata.DataInterface]

    Use the show function to display the data element in the Architectural Data Editor.

    show(dataElem1)

    Architectural Data Editor window, displays the Interfaces tab. The data interface and its two data elements are visible in the main contents pane.

    Input Arguments

    collapse all

    Architectural Data object, specified as a Simulink.dictionary.ArchitecturalData object, or any object owned by Simulink.dictionary.ArchitecturalData.

    Version History

    Introduced in R2023b