Exclude locked segment from analysis programmatically (or putting it in a separated category)

We are currently trying to perform analysis Task in one of our plugin.

The testers pointed out that for some project the locked segments are exclude and for the other not. 

This came from the project settings that are not set the same way 

Screenshot of Analyze Files Settings with options to Report Cross-File repetitions, Report internal fuzzy match leverage, Report locked segments as a separate category, and Exclude locked segments from analysis. The last two options are highlighted.

After searching the api, I found the settings AnalysisTask but it doesn't seems to provide access to the two parameters needed to control the locked segments.

ISettingsBundle settings = project.GetSettings();
AnalysisTaskSettings analyseSettings = settings.GetSettingsGroup<AnalysisTaskSettings>();

Am I doing something wrong or is it not possible to change it programmatically ? 

We are using Trados Studio 2022 SR2 - 17.2.10.19084

thanks for your help



Generated Image Alt-Text
[edited by: RWS Community AI at 2:35 PM (GMT 0) on 30 Jan 2025]