getDataType - Get data type in Architectural Data section of Simulink data dictionary - MATLAB (original) (raw)
Main Content
Get data type in Architectural Data section of Simulink data dictionary
Since R2023b
Syntax
Description
[dataTypeObj](#mw%5F64ee2f2e-3f4a-43c7-8c21-ad2625948c9e) = getDataType([archDataObj](#mw%5F28d7bb65-2d07-43ad-afc6-6086e6b8e312),[dataTypeName](#mw%5F549021dd-5a78-405d-bf83-ce9ee0f21d64))
returns the data type object in archDataObj
, the Architectural Data section of a data dictionary, that represents the data type specified bydataTypeName
.
Examples
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 themyAliasType1
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
DataType
definition name in the DataTypes
property array of archDataObj
, specified as a character vector or a string scalar.
Example: "airSpeed"
Output Arguments
Data type object of an architectural data element, returned as aSimulink.dictionary.archdata.DataType
object.
Version History
Introduced in R2023b