SDK 4.0 Project Automation: Report locked segments in separate category

The following documentation fails to mention the option within SDL Trados, "Report locked segments in separate category":

It seems that this question/discussion has been raised multiple times before, without any official response as to whether this issue will be introduced.

It is essential for my application for this option to be included in the AnalysisTaskSettings, to make sure that inContextExact and exact matches are included in the locked XML element, and that the Excel report reflects this.

  • Analyze files it's a batch task which is included in SDL Studio. Adding or changing the content of the report is not part of the API all you can do is run the batch task using the project automation API. However with Studio SR2 release we've added a new API that allows you to build you own custom batch tasks which means you can create your own report based on your requirements. More about the Batch Task API here. Regarding how can find locked segments please follow this discussion where is explained how you can lock an existing segment. In a similar way you can just find which segments are locked an create your own report. Also you can find here a batch task plugin that is creating his own custom report.

  • Hi Romulus,
    Thanks for the reply, although it does seem slightly odd that the API does have some configuration settings for:
    analyzeSettings.ReportCrossFileRepetitions.Value = true;
    analyzeSettings.ReportInternalFuzzyMatchLeverage.Value = true;
    ... but not for something like "analyzeSettings.ReportLockedSegmentsSeparately.Value = true"
    I'll take a look at your suggestions for the Custom Batch Task API for reports.
    I am already locking Exac and Context matches during the PreTranslationProcess, so hopefully finding a solution for enabling this option will be there!
  • If you don't want to create your custom report you could do something like this in your plugin:

                var settingsBundle = project.GetSettings();
                var analysisTaskSettings = settingsBundle.GetSettingsGroup<AnalysisTaskSettings>();
                analysisTaskSettings.GetSetting<bool>("ReportLockedSegmentsSeparately").Value = true;
  • Hi Romulus,
    This is exactly what I'm after!
    Superb stuff, Thanks!
  • Hello Romulus, I am a bit perplexed by the above code... It looks to me like the code fetches an already existing value from the project settings. In our case, our projects already have that setting included, so, Im trying to understand what updating the project settings with an already existing value will do. You do mention "plugin" in your answer... is the code above not invocable from from the API?