Main Content

getInterface

Get object for named interface in dictionary

Description

interface = getInterface(dictionary,name) gets the object for a named interface in the dictionary.

example

interface = getInterface(dictionary,name,Name=Value) gets the object for a named interface in the dictionary with additional options.

Examples

collapse all

Add a data interface newInterface to the dictionary of the model. Obtain the data interface object. Confirm by opening the Interface Editor.

arch = systemcomposer.createModel("newModel");
addInterface(arch.InterfaceDictionary,"newInterface");
interface = getInterface(arch.interface.Dictionary,"newInterface")
interface = 

  DataInterface with properties:

          Owner: [1×1 systemcomposer.interface.Dictionary]
           Name: 'newInterface'
       Elements: [0×0 systemcomposer.interface.DataElement]
          Model: [1×1 systemcomposer.arch.Model]
           UUID: '205cdd2f-12bc-4bbb-a4a7-75d0ab18adb8'
    ExternalUID: ''

Add a physical interface newInterface to the dictionary of the model. Obtain the physical interface object. Confirm by opening the Interface Editor.

arch = systemcomposer.createModel("newModel");
addPhysicalInterface(arch.InterfaceDictionary,"newInterface");
interface = getInterface(arch.interface.Dictionary,"newInterface")
interface = 

  PhysicalInterface with properties:

          Owner: [1×1 systemcomposer.interface.Dictionary]
           Name: 'newInterface'
       Elements: [0×0 systemcomposer.interface.PhysicalElement]
          Model: [1×1 systemcomposer.arch.Model]
           UUID: '6110207d-2d6d-470e-9bf5-f0e6f6914685'
    ExternalUID: ''

Input Arguments

collapse all

Data dictionary, specified as a systemcomposer.interface.Dictionary object. For information on how to create a data dictionary, see createDictionary.

Name of interface, specified as a character vector or string.

Example: "newInterface"

Data Types: char | string

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: getInterface(dict,"newInterface",ReferenceDictionary="")

Reference dictionary to search for interfaces, specified as a character vector or string with the .sldd extension. Enter an empty character vector or string to include all referenced dictionaries in the search.

Example: getInterface(dict,"newInterface",ReferenceDictionary="referenceDictionary.sldd")

Data Types: char | string

Output Arguments

collapse all

More About

collapse all

Version History

Introduced in R2019a

See Also

Functions

Objects

Blocks

Tools