create
Syntax
Description
creates and returns a new object of the specified type in the connected data source.dataObj
= create(connectionObj
, varType
, varName
)
If a data connection can see multiple data sources (for example, a data dictionary and its referenced dictionaries), the function creates the object in the directly connected data source.
Simulink® reports an error if the varName
already exists in the
connected data source or if the data source does not support the
varType
.
creates a dataObj
= create(connectionObj
, 'Bus', busElementNames
)Simulink.Bus
object with the specified
Simulink.BusElement
objects.
creates a dataObj
= create(connectionObj
, 'Enum', enumerals
, enumValues
)Simulink.data.dictionary.EnumTypeDefinition
object with the
specified enumeration members and member values. This is the only way to create a new enum
type in a data source. You cannot create an enum type in a data source by using dot notation
or the set
function.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2024a