SDL PowerShell Toolkit

SDL is pleased to announce the availability of a beta version of the SDL PowerShell Toolkit.

The SDL PowerShell Toolkit is a set of modules using Windows PowerShell scripting technology and the Project Automation and Translation Provider APIs from the SDL Trados Studio Professional SDK. In a nutshell, the modules provide functions and sample code that you can re-use in your PowerShell scripts to automate SDL Trados Studio. They feature an initial set of code for use in typical Studio automation tasks such as creating a project, a translation memory or a package derived from a project. You can use these as a starting point for your own PowerShell-based efforts. It is assumed that the reader is familiar with Windows PowerShell as well as an initial understanding of the SDL Trados Studio SDK, in particular the project automation API.

Over time, we would like to see the development community develop further modules and helpful functions that we can share with each other.

Best regards, Ian

Ian Davies | Senior Product Manager | SDL | Language Technologies Division | +44 7826843819

Paul Filkin | RWS Group

________________________
Design your own training!

You've done the courses and still need to go a little further, or still not clear? 
Tell us what you need in our Community Solutions Hub

PowerShellToolkit.zip
Parents Reply
  • Hi Luis,

    I have had a go at using the latest set of examples and have successfully analyzed a test file using an existing file based TM. All was going well until I tried to change the analyzeFile setting analyseSettings.ReportInternalFuzzyMatchLeverage.Value = true;

    The issue I have is the innocent looking line:

    AnalysisTaskSettings analyseSettings = settings.GetSettingsGroup<AnalysisTaskSettings>();

    Powershell does not easily support this type of generic method invocation, I have tried a few web-based ideas out but to no avail. Have you encountered this issue yourself? Any help would be most appreciated.

    This is what I am trying to convert from c# to powershell (taken from API documentation pages)

    public void GetAnalyzeTaskSettings(FileBasedProject project)

    {

       #region "AnalysisTaskSettings"

       ISettingsBundle settings = project.GetSettings();

       AnalysisTaskSettings analyseSettings = settings.GetSettingsGroup<AnalysisTaskSettings>();

       #endregion

       #region "ReportCrossFileRepetitions"

       analyseSettings.ReportCrossFileRepetitions.Value = true;

       #endregion

       #region "ReportInternalFuzzyMatchLeverage"

       analyseSettings.ReportInternalFuzzyMatchLeverage.Value = true;

       #endregion

       #region "ExportFrequentSettings"

       analyseSettings.ExportFrequentSegments.Value = true;

       analyseSettings.FrequentSegmentsNoOfOccurrences.Value = 5;

       #endregion

       #region "ExportUnknownSegments"

       analyseSettings.ExportUnknownSegments.Value = true;

       analyseSettings.UnknownSegmentsMaximumMatchValue.Value = 50;

       #endregion

       #region "UpdateAnalyzeSettings"

       project.UpdateSettings(settings);

       #endregion

    }

Children