Main Content

show

Show data element in Interface Editor

Since R2022b

    Description

    example

    show(dataElementObj) displays the DataElement object in the Architectural Data Editor.

    Examples

    collapse all

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

    Create a Simulink.interface.Dictionary object by opening an existing interface dictionary.

    interfaceDictObj = Simulink.interface.dictionary.open('myInterfaceDict.sldd')
    interfaceDictObj = 
      Dictionary with properties:
    
        DictionaryFileName: 'myInterfaceDict.sldd'
                Interfaces: [1×1 Simulink.interface.dictionary.DataInterface]
                 DataTypes: [0×0 Simulink.interface.dictionary.DataType]

    Use the getElement function to access a data element.

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

    Use the show function to display the data element in the Interface Editor.

    show(dataElem1)

    Interface Editor window displaying data element object elementObj

    Input Arguments

    collapse all

    Data element to show in the Interface Editor, specified as a Simulink.interface.dictionary.DataElement object.

    Version History

    Introduced in R2022b

    expand all