Main Content

addCloneToIgnoreList

Class: Simulink.CloneDetection.ReplacementConfig
Namespace: Simulink.CloneDetection

Add subsystem to clone replacement ignore list

Syntax

addCloneToIgnoreList(cloneReplacementConfig,subsystemName)

Description

addCloneToIgnoreList(cloneReplacementConfig,subsystemName) adds the specified subsystem name to the clone replacement ignore list associated with the cloneReplacementConfig object.

Input Arguments

expand all

Settings to replace clones, specified as a Simulink.CloneDetection.ReplacementConfig object.

Name of the subsystem, specified as a character vector.

Examples

expand all

Create a Simulink.CloneDetection.ReplacementConfig object.

cloneReplacementConfig = Simulink.CloneDetection.ReplacementConfig();

Add a subsystem to the list of ignored clones.

addCloneToIgnoreList(cloneReplacementConfig,'ex_detect_clones_E/Subsystem1')
ans = 

  ReplacementConfig with properties:

    LibraryNameToAddSubsystemsTo: 'newLibraryFile'
                   IgnoredClones: {'ex_detect_clones_E/Subsystem1'}
     SubsystemReferenceFileNames: []

The subsystem is listed in the IgnoredClones property of the Simulink.CloneDetection.ReplacementConfig object.