Main Content

getInterface

Get interface object for interface in Simulink interface dictionary

Since R2022b

Description

example

interfaceObj = getInterface(dictObj,interfaceName) returns the interface object that represents the specified interface in the interface dictionary.

Examples

collapse all

To get the interface object that represents the specified interface, use the getInterface function. For an example that shows more of the workflow for related functions, see Create and Configure Interface Dictionary.

myInterfaceObj = getInterface(dictAPI,'DataInterface')
myInterfaceObj = 

  DataInterface with properties:

           Name: 'DataInterface'
    Description: ''
       Elements: [1×3 Simulink.interface.dictionary.DataElement]
          Owner: [1×1 Simulink.interface.Dictionary]

Input Arguments

collapse all

Interface dictionary, specified as a Simulink.interface.Dictionary object. Before you use this function, create or open dictObj by using Simulink.interface.dictionary.create or Simulink.interface.dictionary.open.

interfaceName definition name in Interfaces property array of dictObj, specified as a character vector or a string scalar.

Example: 'DataInterface'

Output Arguments

collapse all

Interface object, returned as a Simulink.interface.dictionary.DataInterface or Simulink.interface.dictionary.ServiceInterface object.

Version History

Introduced in R2022b

expand all