Main Content
Simulink.dictionary.archdata.Constant
Store constant values in Architectural Data section of data dictionaries
Since R2023b
Description
Use a Simulink.dictionary.archdata.Constant
object to represent a
constant in the Architectural Data section of a data dictionary.
Creation
You can add a Simulink.dictionary.archdata.Constant
object to a data
dictionary in two ways.
Interactively create a
Simulink.dictionary.archdata.Constant
object by using the Architectural Data Editor.Programmatically create a
Simulink.dictionary.archdata.Constant
object by using theaddConstant
function.
archDataObj = Simulink.dictionary.archdata.create("dataDictionary.sldd"); constant = addConstant(archDataObj,"myConst","Value",4)
constant = Constant with properties: Name: 'myConst' Value: 4 DataType: 'double' Description: '' Owner: [1×1 Simulink.dictionary.ArchitecturalData]
Properties
Object Functions
moveToDictionary | Move architectural data of Simulink data dictionary to another data dictionary |
moveToDesignData | Move interfaces, data types, and constants in Architectural Data section of Simulink data dictionary to design data |
show | View architectural data of Simulink data dictionary in Architectural Data Editor |
destroy | Delete data element and remove from data interface |
Examples
Version History
Introduced in R2023b