Main Content


Get default storage class or storage class property setting for model data category

Since R2020b



    propertyValue = getDataDefault(myCodeMappingObj,category,property) returns the value from the code mappings of the specified property for the specified data category.

    You cannot specify default data interfaces for models with an attached Embedded Coder Dictionary that defines a service interface configuration.


    collapse all

    From the model code mappings for model myConfigModel, get the default storage class setting for root-level inports.

    cm = coder.mapping.api.get('myConfigModel');
    defaultStorageClass = getDataDefault(cm,'Inports','StorageClass');

    Input Arguments

    collapse all

    Code mapping object (model code mappings) returned by a call to function coder.mapping.api.get.

    Example: myCM

    Category of model data elements that you return a property value for.

    Example: 'Inports'

    Code mapping property that you return a value for. Specify one of these property names.

    Information to ReturnProperty Name
    Name of storage classStorageClass
    Name of variable for data element in the generated codeIdentifier

    Example: 'Identifier'

    Output Arguments

    collapse all

    The property value is one of these values depending on the category and property that you specify.

    PropertyValue Returned
    StorageClassOne of these values: Auto, , Dictionary default, ExportedGlobal, , ImportedExtern, ImportedExternPointer,

    Data Types: char | string

    Version History

    Introduced in R2020b