Main Content

getDataType

Get data type in Architectural Data section of Simulink data dictionary

Since R2023b

    Description

    example

    dataTypeObj = getDataType(archDataObj,dataTypeName) returns the data type object in archDataObj, the Architectural Data section of a data dictionary, that represents the data type specified by dataTypeName.

    Examples

    collapse all

    To get the data type object that represents a data type in a data dictionary, use the getDataType 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.

    myColorObj = getDataType(archDataObj,"myColor")
    myColorObj = 
    
      EnumType with properties:
    
                Name: 'myColor'
         Description: ''
        DefaultValue: 'enum1'
         StorageType: 'Native Integer'
           Enumerals: [1×1 Simulink.dictionary.archdata.Enumeral]
               Owner: [1×1 Simulink.dictionary.ArchitecturalData]
    

    Get the AliasType object specified by the myAliasType1 data type name in the archDataObj object.

    myAliasType1Obj = getDataType(archDataObj,'myAliasType1')
    myAliasType1Obj = 
    
      AliasType with properties:
    
               Name: 'myAliasType1'
           BaseType: 'double'
        Description: ''
              Owner: [1×1 Simulink.dictionary.ArchitecturalData]

    Input Arguments

    collapse all

    Architectural Data object, specified as a Simulink.dictionary.ArchitecturalData object.

    DataType definition name in the DataTypes property array of archDataObj, specified as a character vector or a string scalar.

    Example: "airSpeed"

    Output Arguments

    collapse all

    Data type object of an architectural data element, returned as a Simulink.dictionary.archdata.DataType object.

    Version History

    Introduced in R2023b