Main Content


Class: Simulink.CloneDetection.Settings
Package: Simulink.CloneDetection

Add folders with models


cloneDetectionSettings = cloneDetectionSettings.addFolders(FolderName)


cloneDetectionSettings = cloneDetectionSettings.addFolders(FolderName) adds folder path to the cloneDetectionSettings object.

Input Arguments

expand all

Name or path of the folder, specified as a character vector.

Output Arguments

expand all

Clone Detection Settings, specified as a Simulink.CloneDetection.Settings object.


  • This example shows how to add a Folder to cloneDetectionSettings object for finding the clones from the models inside the folder. The folder name is Folders1.

    FolderName = 'Folders1';
    cloneDetectionSettings = Simulink.CloneDetection.Settings();
    cloneDetectionSettings = cloneDetectionSettings.addFolders(FolderName);
    cloneDetectionSettings = 
      Settings with properties:
                                IgnoreSignalName: 0
                             IgnoreBlockProperty: 0
                          ExcludeModelReferences: 0
                             ExcludeLibraryLinks: 0
                          SelectedSystemBoundary: []
                  FindClonesRecursivelyInFolders: 1
                        ParamDifferenceThreshold: 50
        ReplaceExactClonesWithSubsystemReference: 0
                                       Libraries: {}
                                         Folders: {'C:\Users\Folders1}
                         DetectClonesAcrossModel: 0
                          ExcludeInactiveRegions: 0