Main Content

setDisplayName

R2026b

Set check display name

Since R2026b

    Description

    setDisplayName(cfgObj,ID,label) sets the display name of the check specified by ID to label in the Model Advisor configuration object cfgObj.

    example

    Examples

    collapse all

    Create a Model Advisor configuration object.

    cfgObj = Advisor.Config;

    Load the Model Advisor configuration file myCustomFile.json. Loading the file sets it as the active configuration so that you can access and edit it.

    loadConfig(cfgObj,"myCustomFile.json");

    Set the display name of the check mathworks.jmaab_v6.db_0032 to Check signals in the folder _SYSTEM_By Product_Simulink Check_Modeling Standards_JMAAB v6 Checks. You can obtain the check instance ID and the input parameters in the Model Advisor when you select the check mathworks.jmaab_v6.db_0032. To obtain the instance ID, right-click the check and click Copy.

    setDisplayName(cfgObj,"_SYSTEM_By Product_Simulink Check_Modeling Standards_JMAAB v6 Checks_mathworks.jmaab_v6.db_0032","Check signals");
    

    Verify the updated name, use getDisplayName function.

    displayName = getDisplayName(cfgObj,"_SYSTEM_By Product_Simulink Check_Modeling Standards_JMAAB v6 Checks_mathworks.jmaab_v6.db_0032")
    
    displayName = 
     'Check signals'
     

    Input Arguments

    collapse all

    Model Advisor configuration object, specified as an Advisor.Config object.

    Instance ID of the check in Model Advisor, specified as a character vector or string scalar.

    The instance ID of the check represents the location of the check in the configuration file. To obtain the instance ID, right-click the check and click Copy.

    Example: "_SYSTEM_By Product_Simulink Check_Modeling Standards_JMAAB v5.1 Checks_mathworks.maab.db_0140"

    Custom display name associated with the specified check, specified as a character vector or string scalar.

    Example: "Check signals"

    Version History

    Introduced in R2026b