Class FileBasedProject
This class provides an implementation of the IProject interface for working with Trados Studio projects.
Inheritance
Inherited Members
Namespace: Sdl.ProjectAutomation.FileBased
Assembly: Sdl.ProjectAutomation.FileBased.dll
Syntax
public class FileBasedProject : IProject, IProjectDeleteOperation
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Constructors
FileBasedProject(ProjectInfo)
Creates a new project based on the default project template set up in Trados Studio.
Declaration
public FileBasedProject(ProjectInfo projectInfo)
Parameters
Type | Name | Description |
---|---|---|
Project |
projectInfo | Properties to use when creating the project. |
Remarks
The default project template has to be set up before you can use this constructor. This is done automatically when Trados Studio starts for the first time after installation.
Exceptions
Type | Condition |
---|---|
System. |
Thrown when trying to use this constructor before Trados Studio has initialized the default project template. |
System. |
Thrown when |
System. |
Thrown when |
FileBasedProject(ProjectInfo, ProjectReference)
Creates a new project based on an existing project.
Declaration
public FileBasedProject(ProjectInfo projectInfo, ProjectReference projectReference)
Parameters
Type | Name | Description |
---|---|---|
Project |
projectInfo | Properties to use when creating the project. |
Project |
projectReference | The existing project to base this new project on. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
System. |
Thrown when |
System. |
Thrown when |
Project |
Thrown when the reference project could not be loaded. |
FileBasedProject(ProjectInfo, ProjectTemplateReference)
Creates a new project based on a project template.
Declaration
public FileBasedProject(ProjectInfo projectInfo, ProjectTemplateReference templateReference)
Parameters
Type | Name | Description |
---|---|---|
Project |
projectInfo | Properties to use when creating the project. |
Project |
templateReference | The project template to base this new project on. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
System. |
Thrown when |
System. |
Thrown when |
Project |
Thrown when the template could not be loaded. |
FileBasedProject(String)
Opens an existing project.
Declaration
public FileBasedProject(string projectFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | projectFilePath | The absolute path to the project file (*.sdlproj). |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Exceptions
Type | Condition |
---|---|
System. |
Thrown if |
System. |
Thrown when |
Project |
Thrown when the project at |
FileBasedProject(String, Boolean, String, String)
Opens an existing server project file.
Declaration
public FileBasedProject(string projectFilePath, bool useWindowsAuthentication, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
String | projectFilePath | |
Boolean | useWindowsAuthentication | |
String | userName | |
String | password |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Properties
Credentials
Gets the Project
Declaration
public ProjectCredentials Credentials { get; }
Property Value
Type | Description |
---|---|
Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
FilePath
The file path of the project file.
Declaration
public string FilePath { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Methods
AddBilingualReferenceFile(BilingualFileMapping)
Associates a bilingual reference file (previously translated version) to a file in the project using a BilingualFileMapping
Declaration
public void AddBilingualReferenceFile(BilingualFileMapping mapping)
Parameters
Type | Name | Description |
---|---|---|
Bilingual |
mapping |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddBilingualReferenceFile(Guid, String)
Associates a bilingual reference file (previously translated version) to a file in the project.
Declaration
public void AddBilingualReferenceFile(Guid projectFileId, string fileToAdd)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | File Id of the file in the project to associate the bilingual file with. |
String | fileToAdd | Absolute path including file name of the bilingual file. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddBilingualReferenceFiles(BilingualFileMapping[])
Associates bilingual reference files (previously translated versions) to project files using an array of BilingualFileMapping objects
Declaration
public void AddBilingualReferenceFiles(BilingualFileMapping[] mappings)
Parameters
Type | Name | Description |
---|---|---|
Bilingual |
mappings |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddFiles(String[])
Adds a set of files into the project, in the root folder.
Declaration
public ProjectFile[] AddFiles(string[] filePaths)
Parameters
Type | Name | Description |
---|---|---|
String[] | filePaths | The paths of the files to add. These should be absolute paths. |
Returns
Type | Description |
---|---|
Project |
The added files |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddFiles(String[], String)
Adds a set of files into the project, below a specified project folder.
Declaration
public ProjectFile[] AddFiles(string[] filePaths, string folderPathInProject)
Parameters
Type | Name | Description |
---|---|---|
String[] | filePaths | The paths of the files to add. These should be absolute paths. |
String | folderPathInProject | The folder in this project below which the files should be added. If empty the files will be in the project root folder. |
Returns
Type | Description |
---|---|
Project |
The added files |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddFolderWithFiles(String, Boolean)
Adds all the files from a folder into the project, in the root folder
Declaration
public ProjectFile[] AddFolderWithFiles(string localFolderPath, bool recursive)
Parameters
Type | Name | Description |
---|---|---|
String | localFolderPath | The absolute path of the folder containing the files to add. |
Boolean | recursive | If |
Returns
Type | Description |
---|---|
Project |
The added files |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddFolderWithFiles(String, String, Boolean)
Adds all the files from a folder into the project, below a specified project folder.
Declaration
public ProjectFile[] AddFolderWithFiles(string localFolderPath, string folderPathInProject, bool recursive)
Parameters
Type | Name | Description |
---|---|---|
String | localFolderPath | The absolute path of the folder containing the files to add. |
String | folderPathInProject | The folder in this project below which the files should be added. If empty the files will be in the project root folder. |
Boolean | recursive | If |
Returns
Type | Description |
---|---|
Project |
The added files |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddMasterTM(TranslationProviderConfiguration, String)
Set master tm for target language
Declaration
public void AddMasterTM(TranslationProviderConfiguration translationProviderConfiguration, string targetIso)
Parameters
Type | Name | Description |
---|---|---|
Translation |
translationProviderConfiguration | |
String | targetIso |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
AddNewFileVersion(Guid, String)
Adds the new file version.
Declaration
public void AddNewFileVersion(Guid projectFileId, string filePath)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | The file id. |
String | filePath | The local file path. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
CheckinFiles(Guid[], String, EventHandler<ProgressEventArgs>)
Uploads the specifies including potentially related files that should be uploaded at the same time and checks them in.
Declaration
public void CheckinFiles(Guid[] projectFileIds, string comment, EventHandler<ProgressEventArgs> progressEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to upload and check-in. |
String | comment | A comment for the checkin. |
Event |
progressEventHandler | Progress event handler. |
Remarks
The method is to be used for check-out files only When passing in a locally added target language file, the corresponding source file is checked in and also all the related new target language files; but no other existing modified target language files. When passing in a locally added source file, the source file and all corresponding target languages files are uploaded and checked in.
CheckoutFiles(Guid[], Boolean, EventHandler<ProgressEventArgs>)
Checks out the files specified by project file id
Declaration
public void CheckoutFiles(Guid[] projectFileIds, bool overrideOnConflict, EventHandler<ProgressEventArgs> progressEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | |
Boolean | overrideOnConflict | |
Event |
progressEventHandler |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Complete()
Change the project status to completed.
Declaration
public void Complete()
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
CreateFromProjectPackage(String, String, out ProjectPackageImport)
Creates a new project from a project package.
Declaration
public static FileBasedProject CreateFromProjectPackage(string projectPackageFilePath, string projectFolder, out ProjectPackageImport result)
Parameters
Type | Name | Description |
---|---|---|
String | projectPackageFilePath | The file path of the project package to open into a new project. Only native Trados Studio packages are supported (*.sdlppx). |
String | projectFolder | The file path of an empty folder to create the new project in. |
Project |
result | Information about the project package import operation. |
Returns
Type | Description |
---|---|
File |
The newly created file-based project; or |
Remarks
Unlike Trados Studio, this API does not allow you to open a project package and merge it into a project that was previously created by opening a project package that originated from the same project. A new project is created for every project package you open using this method.
CreateFromProjectPackage(String, String, EventHandler<ProgressEventArgs>, EventHandler<MessageEventArgs>, out ProjectPackageImport)
Creates a new project from a project package.
Declaration
public static FileBasedProject CreateFromProjectPackage(string projectPackageFilePath, string projectFolder, EventHandler<ProgressEventArgs> statusEventHandler, EventHandler<MessageEventArgs> messageEventHandler, out ProjectPackageImport result)
Parameters
Type | Name | Description |
---|---|---|
String | projectPackageFilePath | The file path of the project package to open into a new project. |
String | projectFolder | The file path of an empty folder to create the new project in. |
Event |
statusEventHandler | Event handler for package creation status events. Can be |
Event |
messageEventHandler | Event handler for message events. Can be |
Project |
result | Information about the project package import operation. |
Returns
Type | Description |
---|---|
File |
The newly created file-based project; or |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
System. |
Thrown when |
System. |
Thrown when |
CreateManualTask(String, String, DateTime, TaskFileInfo[])
Creates a manual task. A manual task includes a set of files that is assigned to a user. The created manual task can be used to create a project package using CreateProjectPackage(Guid, String, String, ProjectPackageCreationOptions, EventHandler<ProgressEventArgs>, EventHandler<MessageEventArgs>)
Declaration
public ManualTask CreateManualTask(string manualTaskName, string assignToUser, DateTime dueDate, TaskFileInfo[] inputFiles)
Parameters
Type | Name | Description |
---|---|---|
String | manualTaskName | The name of the manual task. Typically "Translate" or "Review", but other task names can be |
String | assignToUser | The user to assign the task to. |
Date |
dueDate | The date by which the task should be completed. |
Task |
inputFiles | The files to include in the task. |
Returns
Type | Description |
---|---|
Manual |
The newly created manual task. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
CreateManualTask(String, String, DateTime, Guid[])
Creates a manual task. A manual task includes a set of files that is assigned to a user. The created manual task can be used to create a project package using CreateProjectPackage(Guid, String, String, ProjectPackageCreationOptions, EventHandler<ProgressEventArgs>, EventHandler<MessageEventArgs>)
Declaration
public ManualTask CreateManualTask(string manualTaskName, string assignToUser, DateTime dueDate, Guid[] projectFileIds)
Parameters
Type | Name | Description |
---|---|---|
String | manualTaskName | The name of the manual task. Typically "Translate" or "Review", but other task names can be |
String | assignToUser | The user to assign the task to. |
Date |
dueDate | The date by which the task should be completed. |
Guid[] | projectFileIds | The project files to include in the task. Reference files will be marked as "read only" task files |
Returns
Type | Description |
---|---|
Manual |
Remarks
This overload allows a list of project file IDs to be specified rather than Task
CreateMergedProjectFile(String, String, Guid[])
Creates a merged file from a number of translatable files in the project.
This allows manipulating the content of all the child files within one physical file.
For more information, see Merged
Declaration
public MergedProjectFile CreateMergedProjectFile(string mergedFileName, string folderPathInProject, Guid[] projectFileIds)
Parameters
Type | Name | Description |
---|---|---|
String | mergedFileName | The file name for the newly created merged file. This must have the ".sdlxliff" extension. |
String | folderPathInProject | The folder in this project in which the merged file be added. If empty the merged file will be in the project root folder. |
Guid[] | projectFileIds | The IDs of the translatable files to be merged in to one. |
Returns
Type | Description |
---|---|
Merged |
The newly created and added merged project file. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
CreateProjectPackage(Guid, String, String, ProjectPackageCreationOptions)
Creates a project package. The package can then be obtained using Save
Declaration
public ProjectPackageCreation CreateProjectPackage(Guid manualTaskId, string packageName, string comment, ProjectPackageCreationOptions options)
Parameters
Type | Name | Description |
---|---|---|
Guid | manualTaskId | The ID of the task that the package relates to. (The task defines which files are included in the package.) |
String | packageName | The name of the package. |
String | comment | Optional comment. |
Project |
options | Various options to control what will be included in a project package. |
Returns
Type | Description |
---|---|
Project |
A Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
CreateProjectPackage(Guid, String, String, ProjectPackageCreationOptions, EventHandler<ProgressEventArgs>, EventHandler<MessageEventArgs>)
Creates a project package. The package can then be obtained using Save
Declaration
public ProjectPackageCreation CreateProjectPackage(Guid manualTaskId, string packageName, string comment, ProjectPackageCreationOptions options, EventHandler<ProgressEventArgs> statusEventHandler, EventHandler<MessageEventArgs> messageEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid | manualTaskId | The ID of the task that the package relates to. (The task defines which files are included in the package.) |
String | packageName | The name of the package. |
String | comment | Optional comment. |
Project |
options | Various options to control what will be included in a project package. |
Event |
statusEventHandler | Event handler for package creation status events. |
Event |
messageEventHandler | Event handler for message events. |
Returns
Type | Description |
---|---|
Project |
A Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
CreateReturnPackage(Guid[], String, String)
Creates a return package from a set of files. The files must all have previously been received as part of a project package in order for the return package to be created.
Declaration
public ReturnPackageCreation CreateReturnPackage(Guid[] projectFileIds, string packageName, string comment)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to include in the return package. |
String | packageName | The name of the package. |
String | comment | A comment for the package. |
Returns
Type | Description |
---|---|
Return |
A Return |
Remarks
It is only valid to call this method if this project was created from a project package
CreateReturnPackage(Guid[], String, String, EventHandler<ProgressEventArgs>, EventHandler<MessageEventArgs>)
Creates a return package from a set of files. The files must all have previously been received as part of a project package in order for the return package to be created.
Declaration
public ReturnPackageCreation CreateReturnPackage(Guid[] projectFileIds, string packageName, string comment, EventHandler<ProgressEventArgs> statusEventHandler, EventHandler<MessageEventArgs> messageEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to include in the return package. |
String | packageName | The name of the package. |
String | comment | A comment for the package. |
Event |
statusEventHandler | Event handler for status events |
Event |
messageEventHandler | Event handler for message events |
Returns
Type | Description |
---|---|
Return |
A Return |
Remarks
It is only valid to call this method if this project was created from a project package
Delete()
Deletes the project. This deletes the entire project folder.
Declaration
public void Delete()
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
DeleteFilesAndDependencies(String)
Deletes the file and its dependencies
Declaration
public void DeleteFilesAndDependencies(string fileNameInProject)
Parameters
Type | Name | Description |
---|---|---|
String | fileNameInProject |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
DeleteFromServer()
Deletes the project from the server
Declaration
public void DeleteFromServer()
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
DownloadLatestServerVersion(Guid, EventHandler<DataTransferEventArgs>, Boolean)
Downloads the latest version of a file from the project server.
Declaration
public bool DownloadLatestServerVersion(Guid projectFileId, EventHandler<DataTransferEventArgs> progressEventHandler, bool force)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | The unique file id |
Event |
progressEventHandler | A progress event handler, allowing the caller to cancel the download if required. |
Boolean | force | if set to |
Returns
Type | Description |
---|---|
Boolean | true if successful |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
DownloadSpecificServerVersion(Guid, Int32, String, EventHandler<DataTransferEventArgs>)
Downloads a specific version of a file from the server in to the specified location
Declaration
public bool DownloadSpecificServerVersion(Guid projectFileId, int versionNumber, string localFilePath, EventHandler<DataTransferEventArgs> progressEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | The unique identifier for the file |
Int32 | versionNumber | The version number of the file you wish to download |
String | localFilePath | The location you wish to download the file to |
Event |
progressEventHandler |
|
Returns
Type | Description |
---|---|
Boolean | true if successful |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetAutomaticTask(Guid)
Retrieves an existing automatic task.
Declaration
public AutomaticTask GetAutomaticTask(Guid automaticTaskId)
Parameters
Type | Name | Description |
---|---|---|
Guid | automaticTaskId | The ID of the automatic task. |
Returns
Type | Description |
---|---|
Automatic |
The automatic task. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetFile(Guid)
Gets the file.
Declaration
public ProjectFile GetFile(Guid projectFileId)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | The file id. |
Returns
Type | Description |
---|---|
Project |
A Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetFiles(Guid[])
Gets an array of files from an array of file ids.
Declaration
public ProjectFile[] GetFiles(Guid[] fileIds)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | fileIds | The array containing the fileIds. |
Returns
Type | Description |
---|---|
Project |
An array of Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetFileTypeConfiguration()
This class provides an implementation of the IProject interface for working with Trados Studio projects.
Declaration
public ProjectFileTypeConfiguration GetFileTypeConfiguration()
Returns
Type | Description |
---|---|
Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetManualTask(Guid)
Retrieves an existing manual task.
Declaration
public ManualTask GetManualTask(Guid manualTaskId)
Parameters
Type | Name | Description |
---|---|---|
Guid | manualTaskId | The ID of the manual task |
Returns
Type | Description |
---|---|
Manual |
The newly created manual task. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetProjectFileVersionHistory(Guid)
Retrieves the history for a specific project file
Declaration
public ProjectFileVersion[] GetProjectFileVersionHistory(Guid projectFileId)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId |
Returns
Type | Description |
---|---|
Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetProjectInfo()
Retrieves information about the project
Declaration
public ProjectInfo GetProjectInfo()
Returns
Type | Description |
---|---|
Project |
A Project |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetProjectStatistics()
Gets the aggregated analysis, word count and confirmation statistics for all the files in the project.
This will not actually compute the statistics, but just return a snapshot of the statistics that where most recently computed.
To update the statistics, run the relevant task: Word
Declaration
public ProjectStatistics GetProjectStatistics()
Returns
Type | Description |
---|---|
Project |
The aggregated analysis, word count and confirmation statistics for all the files in the project. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetSettings()
Gets the project-level settings.
Declaration
public ISettingsBundle GetSettings()
Returns
Type | Description |
---|---|
ISettings |
A settings bundle containing the project settings. Never returns |
Remarks
Project settings can be overridden for a specific target language using Update
GetSettings(Language)
Gets the settings for a specific target language.
Declaration
public ISettingsBundle GetSettings(Language targetLanguage)
Parameters
Type | Name | Description |
---|---|---|
Language | targetLanguage | The project target language for which to retrieve the settings. |
Returns
Type | Description |
---|---|
ISettings |
A settings bundle containing the target language specific settings. The settings bundle returned will have a parent
settings bundle which represent the current project settings. Never returns |
Remarks
Target language settings override settings specified on the project level (see Get
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
GetSourceLanguageFiles()
Retrieves all source language files.
Declaration
public ProjectFile[] GetSourceLanguageFiles()
Returns
Type | Description |
---|---|
Project |
All the source language files in this project. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetTargetLanguageFiles()
Retrieves all target language files.
Declaration
public ProjectFile[] GetTargetLanguageFiles()
Returns
Type | Description |
---|---|
Project |
An array of Project |
Remarks
For merged files (Merged
GetTargetLanguageFiles(Language)
Retrieves all files for the specified target language.
Declaration
public ProjectFile[] GetTargetLanguageFiles(Language targetLanguage)
Parameters
Type | Name | Description |
---|---|---|
Language | targetLanguage | The target language to retrieve files for. |
Returns
Type | Description |
---|---|
Project |
An array of Project |
Remarks
For merged files (Merged
GetTermbaseConfiguration(Boolean)
Retrieves all termbase-related settings that are associated with this project.
Declaration
public TermbaseConfiguration GetTermbaseConfiguration(bool obtainCopy = false)
Parameters
Type | Name | Description |
---|---|---|
Boolean | obtainCopy |
Returns
Type | Description |
---|---|
Termbase |
A Termbase |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
GetTranslationProviderConfiguration()
Gets the translation provider configuration for this project.
Declaration
public TranslationProviderConfiguration GetTranslationProviderConfiguration()
Returns
Type | Description |
---|---|
Translation |
The translation provider configuration. This never returns |
Remarks
The translation provider configuration overridden for a specific target language
(see Get
GetTranslationProviderConfiguration(Language)
Gets the translation provider configuration for the specified target language. If no specific configuration has been specified for the specified target language,
this method returns an empty (not null
!) configuration.
Declaration
public TranslationProviderConfiguration GetTranslationProviderConfiguration(Language targetLanguage)
Parameters
Type | Name | Description |
---|---|---|
Language | targetLanguage | The target language for which to get the translation provider configuration. |
Returns
Type | Description |
---|---|
Translation |
The translation provider configuration for the specified target language. This never returns |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
ImportReturnPackage(String)
Imports a return package into this project.
Declaration
public ReturnPackageImport ImportReturnPackage(string returnPackageFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | returnPackageFilePath | The file path of the return package to import. Has file extension .sdlrpx |
Returns
Type | Description |
---|---|
Return |
Information about the import operation. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
ImportReturnPackage(String, EventHandler<ProgressEventArgs>, EventHandler<MessageEventArgs>)
Imports a return package into this project.
Declaration
public ReturnPackageImport ImportReturnPackage(string returnPackageFilePath, EventHandler<ProgressEventArgs> statusEventHandler, EventHandler<MessageEventArgs> messageEventHandler)
Parameters
Type | Name | Description |
---|---|---|
String | returnPackageFilePath | The file path of the return package to import. Has file extension .sdlrpx |
Event |
statusEventHandler | Event handler for status events |
Event |
messageEventHandler | Event handler for message events |
Returns
Type | Description |
---|---|
Return |
Information about the import operation. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
OpenProjectFileStream(Guid)
Returns a stream that can be used to save out the latest version of the file.
Declaration
public Stream OpenProjectFileStream(Guid projectFileId)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | The file to obtain the stream for. |
Returns
Type | Description |
---|---|
Stream | A stream from which the file contents can be read. It is the responsibility of the caller to close this stream. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
PublishProject(Uri, Boolean, String, String, String, EventHandler<PublishProjectEventArgs>)
Publish this project to a Groupshare Project Server.
Declaration
public PublishProjectResult PublishProject(Uri serverUri, bool useWindowsAuthentication, string userName, string password, string organizationPath, EventHandler<PublishProjectEventArgs> progressEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Uri | serverUri | The full URI of the project server e.g. https://projectserver.mydomain.com:8080 |
Boolean | useWindowsAuthentication | If true use window authentication, false use custom authentication |
String | userName | The user name you wish to use to publish the project |
String | password | The password you with to use to publish the project |
String | organizationPath | The organization path on the Groupshare server where you want the project to be published |
Event |
progressEventHandler | Callback for monitoring the |
Returns
Type | Description |
---|---|
Publish |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
RemoveBilingualReferenceFile(Guid)
Removes a bilingual reference file (previously translated version) from a project file
Declaration
public void RemoveBilingualReferenceFile(Guid projectFileId)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | File Id of the file in the project to remove the bilingual file from. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
RunAutomaticTask(Guid[], String)
Runs an automatic task on a set of files.
Automatic task template IDs are defined in Automatic
Declaration
public AutomaticTask RunAutomaticTask(Guid[] projectFileIds, string taskTemplateId)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to run the task on. |
String | taskTemplateId | The ID of the task template (i.e. the type of task) to run. |
Returns
Type | Description |
---|---|
Automatic |
Information about the automatic task that has been run. |
Remarks
Multiple automatic tasks can be run together in a sequence using Run
RunAutomaticTask(Guid[], String, EventHandler<TaskStatusEventArgs>, EventHandler<TaskMessageEventArgs>)
Runs an automatic task on a set of files.
Automatic task template IDs are defined in Automatic
Declaration
public AutomaticTask RunAutomaticTask(Guid[] projectFileIds, string taskTemplateId, EventHandler<TaskStatusEventArgs> statusEventHandler, EventHandler<TaskMessageEventArgs> messageEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to run the task on. |
String | taskTemplateId | The ID of the task template (i.e. the type of task) to run. |
Event |
statusEventHandler | Event handler for task status events. |
Event |
messageEventHandler | Event handler for message events. |
Returns
Type | Description |
---|---|
Automatic |
Information about the automatic task that has been run. |
Remarks
Multiple automatic tasks can be run together in a sequence using Run
RunAutomaticTasks(Guid[], String[])
Runs a sequence of automatic tasks on a set of project files. This can be more efficient than running tasks
individually using Run
Declaration
public TaskSequence RunAutomaticTasks(Guid[] projectFileIds, string[] taskTemplateIds)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to run the task on. |
String[] | taskTemplateIds | The IDs of the task templates (i.e. the types of task) to run. |
Returns
Type | Description |
---|---|
Task |
Information about the sequence of tasks that has been run. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
RunAutomaticTasks(Guid[], String[], EventHandler<TaskStatusEventArgs>, EventHandler<TaskMessageEventArgs>)
Runs a sequence of automatic tasks on a set of project files. This can be more efficient than running tasks
individually using Run
Declaration
public TaskSequence RunAutomaticTasks(Guid[] projectFileIds, string[] taskTemplateIds, EventHandler<TaskStatusEventArgs> statusEventHandler, EventHandler<TaskMessageEventArgs> messageEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to run the task on. |
String[] | taskTemplateIds | The IDs of the task templates (i.e. the types of task) to run. |
Event |
statusEventHandler | Event handler for task status events. |
Event |
messageEventHandler | Event handler for message events. |
Returns
Type | Description |
---|---|
Task |
Information about the sequence of tasks that has been run. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
RunDefaultTaskSequence(Guid[])
Runs the default task sequence of automatic tasks on a set of project files.
Declaration
public TaskSequence RunDefaultTaskSequence(Guid[] projectFileIds)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to run the task on. |
Returns
Type | Description |
---|---|
Task |
Information about the sequence of tasks that has been run. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
RunDefaultTaskSequence(Guid[], EventHandler<TaskStatusEventArgs>, EventHandler<TaskMessageEventArgs>)
Runs the default task sequence of automatic tasks on a set of project files.
Declaration
public TaskSequence RunDefaultTaskSequence(Guid[] projectFileIds, EventHandler<TaskStatusEventArgs> statusEventHandler, EventHandler<TaskMessageEventArgs> messageEventHandler)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The files to run the task on. |
Event |
statusEventHandler | Event handler for task status events. |
Event |
messageEventHandler | Event handler for message events. |
Returns
Type | Description |
---|---|
Task |
Information about the sequence of tasks that has been run. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Save()
Persists the project file. The file has extension .sdlproj and is located in the folder given by Local
Declaration
public void Save()
Remarks
It is recommended to regularly save the project, for example after making a set of changes and after running a task.
SavePackageAs(Guid, String)
Saves out the package to a specified file location.
Declaration
public void SavePackageAs(Guid packageId, string path)
Parameters
Type | Name | Description |
---|---|---|
Guid | packageId | The ID of the package to save. |
String | path | The file path to save the package to. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
SaveProjectFileAs(Guid, String)
Saves out the file to a specified file location.
Declaration
public void SaveProjectFileAs(Guid projectFileId, string outputFilePath)
Parameters
Type | Name | Description |
---|---|---|
Guid | projectFileId | The file to save. |
String | outputFilePath | The file path to save the project file to. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
SaveTaskReportAs(Guid, String, ReportFormat)
Saves the task report out to a file, in the specified format
Declaration
public void SaveTaskReportAs(Guid reportId, string path, ReportFormat reportFormat)
Parameters
Type | Name | Description |
---|---|---|
Guid | reportId | The id of the task report to save. |
String | path | The file path to save the report to. |
Report |
reportFormat | The format used when saving out the report. |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
SetFileRole(Guid[], FileRole)
Changes the role of the file. A Scan task (Scan) should be run after changing the file role in this way.
Declaration
public void SetFileRole(Guid[] projectFileIds, FileRole fileRole)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The IDs of the project files. |
File |
fileRole | The new File |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
SynchronizeServerProjectData()
Synchronizes the local project information with the information stored on the server
Declaration
public bool SynchronizeServerProjectData()
Returns
Type | Description |
---|---|
Boolean |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
UndoCheckoutFiles(Guid[])
Removes the lock on server files without changing the version of the file on the server
Declaration
public void UndoCheckoutFiles(Guid[] projectFileIds)
Parameters
Type | Name | Description |
---|---|---|
Guid[] | projectFileIds | The list of files to uncheckout |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
UpdateProject(ProjectInfo)
Updates the project with the new information contained in projectInfo
.
Declaration
public ProjectInfo UpdateProject(ProjectInfo projectInfo)
Parameters
Type | Name | Description |
---|---|---|
Project |
projectInfo | A object. |
Returns
Type | Description |
---|---|
Project |
The updated project information. |
Remarks
It is only valid to update certain properties. See the comments in Project
UpdateSettings(Language, ISettingsBundle)
Updates the settings for a specific target language.
Declaration
public void UpdateSettings(Language targetLanguage, ISettingsBundle settings)
Parameters
Type | Name | Description |
---|---|---|
Language | targetLanguage | The target language for which to update the settings. |
ISettings |
settings | A settings bundle representing the new target language settings. |
Remarks
Note that this method will only update the target-language settings. If you have changed the parent project-level
settings too, thee need to be updated with a separate call to Update
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
System. |
Thrown if |
UpdateSettings(ISettingsBundle)
Updates the project-level settings.
Declaration
public void UpdateSettings(ISettingsBundle settings)
Parameters
Type | Name | Description |
---|---|---|
ISettings |
settings | A settings bundle object containing the new project settings. |
Remarks
The project settings will be completely replaced with the specified settings, so any settings not present in the updated settings bundle will revert to their defaults.
You can also override settings for a specific target language. See Update
Exceptions
Type | Condition |
---|---|
System. |
Thrown if |
UpdateTermbaseConfiguration(TermbaseConfiguration)
Updates the termbase-related settings for this project.
Declaration
public void UpdateTermbaseConfiguration(TermbaseConfiguration termbaseConfiguration)
Parameters
Type | Name | Description |
---|---|---|
Termbase |
termbaseConfiguration | A Termbase |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
UpdateTranslationProviderConfiguration(Language, TranslationProviderConfiguration)
Updates the translation provider configuration for a specific project target language.
Declaration
public void UpdateTranslationProviderConfiguration(Language targetLanguage, TranslationProviderConfiguration translationProviderConfiguration)
Parameters
Type | Name | Description |
---|---|---|
Language | targetLanguage | The project target language for which to update the configuration. |
Translation |
translationProviderConfiguration | The translation provider configuration. Note that you need to set
Override in order for the configuration to be used. If this is
set to , the project-wide translation provider configuration will be used instead (Get |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
System. |
Thrown when |
System. |
Thrown when |
UpdateTranslationProviderConfiguration(TranslationProviderConfiguration)
Updates the project-wide translation provider configuration.
Declaration
public void UpdateTranslationProviderConfiguration(TranslationProviderConfiguration translationProviderConfiguration)
Parameters
Type | Name | Description |
---|---|---|
Translation |
translationProviderConfiguration | The translation provider configuration. Note that the project-wide configuration might have been
overridden for one or more specific project target languages (see Update |
Remarks
An Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following:
When creating a new File
The File
Project created using the Project Automation API will not automatically be added to the Trados Studio project list. In order to do this, simply open the project in Trados Studio, which will add it to the list.
Exceptions
Type | Condition |
---|---|
System. |
Thrown when |
System. |
Thrown when |