Main Content

coder.asap2.UserCustomizeBase

Customize project and module settings

    Description

    example

    Obj = coder.asap2.UserCustomizeBase creates an object to define PROJECT, MODULE, MOD, MOD_PAR, and MOD_COMMON settings. Use the object to add the fields to ASAP2 file.

    Examples

    collapse all

    Open and build the model.

    open_system("rtwdemo_asap2");
    rtwbuild("rtwdemo_asap2");

    Create a custom base object and define the fields.

    Obj = coder.asap2.UserCustomizeBase;
    Obj.ProjectName = 'Demo project name';
    Obj.ProjectComment = 'Custom comment for the demo project';
    Obj.ModuleName = 'Demo module name';
    Obj.ModuleComment = 'Custom comment for the demo module';
    Obj.HeaderComment = 'Custom comment';

    Generate an ASAP2 file by passing the object using the command:

    coder.asap2.export("rtwdemo_asap2",CustomizationObject=Obj);

    Output Arguments

    collapse all

    The function creates an UserCustomizeBase object and it can be used to add the PROJECT, MODULE, MOD, MOD_PAR, and MOD_COMMON settings in the ASAP2 file.

    Tips

    Use the coder.asap2.UserCustomizeBase object to define the following fields:

    Field
    HeaderComment
    ModParComment
    ModCommonComment
    ASAP2FileName
    ByteOrder
    ProjectName
    ProjectComment
    ModuleName
    ModuleComment
    AfterBeginHeaderComments
    BeforeEndHeaderComments
    AfterBeginProjectComments
    BeforeEndProjectComments
    AfterBeginModuleComments
    BeforeEndModuleComments
    AfterBeginModParComments
    BeforeEndModParComments
    AfterBeginModCommonComments
    BeforeEndModCommonComments
    AddA2MLSection
    AddIfDataSection

    Version History

    Introduced in R2022b