주요 콘텐츠

getThresholdSet

R2026b

Get threshold set from configuration by identifier

Since R2026b

    Description

    val = getThresholdSet(config,id) returns the threshold set with the specified identifier from the configuration. Returns empty if no matching threshold set is found. Use this function to get a specific threshold set so you can inspect or modify its properties and threshold rules. For more information about threshold customization, see Adjust Dashboard Thresholds to Match Your Testing Criteria.

    Example of custom threshold set in threshold settings for a dashboard

    example

    Examples

    collapse all

    Get a threshold set from a configuration.

    proj = currentProject;
    p = proj.RootFolder;
    config = metric.config.Configuration.open(fullfile(p,"MyConfig.json"));
    val = getThresholdSet(config,"MyCustomTesting")

    Input Arguments

    collapse all

    Configuration, specified as a metric.config.Configuration object.

    Identifier of the threshold set to get, specified as a string scalar.

    Data Types: string

    Output Arguments

    collapse all

    Threshold set, returned as a metric.threshold.ThresholdSet object. If no threshold set matches the specified identifier, the function returns an empty result.

    Version History

    Introduced in R2026b