getDataType
Description
returns the data type object that represents the data type specified by
dataTypeObj
= getDataType(dictObj
,dtName
)dtName
.
Examples
Get Data Type from Simulink Interface Dictionary
To get the data type object that represents the specified data type
name, use the getDataType
function. For an example that shows more of
the workflow for related functions, see Create and Configure Interface Dictionary.
Get the EnumType
object for myColor
data type
name in the dictAPI
dictionary object.
myColorObj = getDataType(dictAPI,'myColor')
myColorObj = EnumType with properties: Name: 'myColor' Description: 'I am a Simulink Enumeration' DefaultValue: 'BLUE' StorageType: 'int16' Enumerals: [1×3 Simulink.interface.dictionary.Enumeral] Owner: [1×1 Simulink.interface.Dictionary]
Get the AliasType
object for myAliasType1
data
type name in the dictAPI
dictionary object.
myAliasType1Obj = getDataType(dictAPI,'myAliasType1')
myAliasType1Obj = AliasType with properties: Name: 'myAliasType1' BaseType: 'fixdt(1,32,16)' Description: '' Owner: [1×1 Simulink.interface.Dictionary]
Input Arguments
dictObj
— Interface dictionary
Simulink.interface.Dictionary
object
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
.
dtName
— DataType
definition name
string scalar | character vector
DataType
definition name in DataTypes
property array of dictObj
, specified as a character
vector or a string scalar.
Example: "airSpeed"
Output Arguments
dataTypeObj
— DataType
object
AliasType
object | EnumType
object | NumericType
object | StructType
object | ValueType
object
DataType
object created from a DataType
element in a dictObj
dictionary object.
Version History
Introduced in R2022bR2023b: Simulink.interface.Dictionary
object replaced by Simulink.dictionary.ArchitecturalData
object
Starting in R2023b, use the Simulink.dictionary.ArchitecturalData
object to programmatically manage architectural data instead of the
Simulink.interface.Dictionary
object.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)