create
Syntax
Description
creates and returns a new object with type dataObj = create(connectionObj,varType,varName)varType and name
varName in the connected data source
connectionObj.
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=busElementNames)Simulink.Bus object with the specified
Simulink.BusElement objects.
creates a dataObj = create(connectionObj,"Enum",Enumerals=enumerals,EnumValues=enumValues)Simulink.data.dictionary.EnumTypeDefinition object with the
specified enumeration members and member values. This is the only way to create a new
enumerated type in a data source. You cannot create an enumerated type in a data source by
using dot notation or the set function.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2024a