• Show convenient version of this site
  • Deutsch
  • English
Contact
Newsletter
  • Products
    • ALS
      • Across Language Server
        • Translation Management
        • Terminology Management
        • Translation Memory
      • Editions
      • Interfaces
    • ATE
      • Across Translator Edition
      • Editions
      • Download
      • Across Account
    • Elanion
      • Overview
      • Login
    • AcrossMT
      • AcrossMT
  • Solutions
    • Customers
      • Enterprises
      • Language Service Providers
      • Translators
    • Industries
      • E-Commerce & Trade
      • Pharmaceuticals & medicine
      • IT & Software
    • Departments
      • Marketing & E-Commerce
      • Technical Documentation
      • Software User Interfaces
  • Services
    • Hosting
    • Training
    • Consulting
  • Partners
    • Language Service Providers
    • Universities
  • Company
    • Across Systems
    • News
    • Events
    • Career
    • Contact
  • Knowledge
    • Blog
    • Video Library
    • Case Studies
    • White Papers
    • Fact Sheets
    • File Formats
    • Expert Features
  • Support
    • New Functions
    • Online Help
    • FAQ
    • Support Request
    • Updates
Schedule Consultation

DocumentManager

  • Unless stated otherwise, all objects are available in the following Across versions:
  • 5.7
  • 6.0
  • 6.3
  • 7.0
Tip

Function-specific return values are listed with each function.

For more information on return values and a complete list of error codes, see Function Return Types.

Function
Description
DocumentManager.ActivateVersion
Activates a version of a document.
DocumentManager.AddAttachmentToDocument
This function lets you add an attachment to a document.
DocumentManager.AddDocumentComment
Adds a comment to the specified document.
DocumentManager.CancelJob
Cancels the specified job. The function only works for jobs created from DocumentManager functions.
DocumentManager.CreateDocumentPartitions
Partitions a document. In Across v7, this will partition all target languages in the same way.
DocumentManager.DeleteVersion
Activates a version of a document.
DocumentManager.GetDocTypeGuidByFileName
Returns the GUID of the document type that matches the supplied filename.
DocumentManager.GetDocumentAttachmentList
Returns a list of the attachments of a specific document.
DocumentManager.GetDocumentComments
Returns the comments of a document.
DocumentManager.GetDocumentDeadline
Returns the due date of a specific document.
DocumentManager.GetDocumentDescription
Returns the description of a document.
DocumentManager.GetDocumentLanguages
Returns all languages of the document. The source language is the first one in the list.
DocumentManager.GetDocumentName
Returns the name of the document with the specified GUID.
DocumentManager.GetDocumentParagraphCount
Returns the number of paragraphs in a document.
DocumentManager.GetDocumentProgress
Returns the progress of the document in percent.
DocumentManager.GetDocumentTemplateGuidByName
Returns the GUID of a document template according to its name.
DocumentManager.GetDocumentTemplateGuidByName2
Returns the GUID of a document template according to its name which belongs to a specific document type.
DocumentManager.GetDocumentVersions
Returns the versions of the document.
DocumentManager.GetDocumentWordCount
Returns the number of words in the document.
DocumentManager.GetDocumentWorkflow
Returns the workflow that has been assigned to the specified document.
DocumentManager.GetFinishedDocumentLanguages
Returns the fully translated languages for a document.
DocumentManager.GetJobProgress
Returns the progress of a job. The function only works for jobs created from DocumentManager functions.
DocumentManager.GetJobResult
Returns the result of a finished job. The function only works for jobs created from DocumentManager functions.
DocumentManager.GetJobStatus
Returns the result of a finished job. The function only works for jobs created from DocumentManager functions.
DocumentManager.IsDocumentFinished
Returns whether a document has been completely translated or not.
DocumentManager.RemoveDocument
Deletes an existing document.
DocumentManager.RemoveDocument2
Deletes an existing document.
DocumentManager.RemoveDocumentAsync
Deletes an existing document.
DocumentManager.RemoveDocumentPartitions
Removes the documents partitions.
DocumentManager.RenameDocument
Renames a document.
DocumentManager.RunDocumentQmCheck
Runs a QM check for one target language of a document.
DocumentManager.RunDocumentQmCheck2
Runs a QM check for one target language of a document.
DocumentManager.SetDocumentDescription
Sets the description of a document.
DocumentManager.SetDocumentFinished
Sets the finished flag of the specified document.
DocumentManager.SetDocumentFinished2
Sets the finished flag of the specified document.

DocumentManager.ActivateVersion

Activates a version of a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
int
VersionNumber
The version number to activate.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
163
Wrong document version number.
Error
165
Cannot activate document version.

DocumentManager.AddAttachmentToDocument

This function lets you add an attachment to a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document to which the attachment should be added.
3
string
FilePath
The path to the attachment that should be added.

Return Values

Result
Type/Value
Interpretation
Success
int
Database-ID of attachment.
Error
16
Document does not exist.
Error
73
Cannot add attachment.

DocumentManager.AddDocumentComment

Adds a comment to the specified document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document to which the comment should be added.
3
string
CommentTitle
The title of the comment.
4
string
CommentText
The text of the comment.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
2
User does not exist.
Error
16
Document does not exist.
Error
60
Unable to add comment to document.

DocumentManager.CancelJob

Cancels the specified job. The function only works for jobs created from DocumentManager functions.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
JobGuid
The GUID of the job.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
17
Job does not exist.
Error
87
Job already finished.
Error
88
Canceling is not supported for the job.

DocumentManager.CreateDocumentPartitions

Partitions a document. In Across v7, this will partition all target languages in the same way.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
int
PartitionsCount
The number of partitions to create.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
180
The document is not ready because it is being checked in.
Error
206
Cannot remove/create document partitions.
Error
217
Partitioning is not allowed for source document editing.
Error
228
Partitioning of tasks is not allowed by the Master Server.
Attention

Since splitting an assigned language is not possible, this function will fail in case any of the target languages is assigned.

DocumentManager.DeleteVersion

Activates a version of a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
int
VersionNumber
The version number to delete.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
163
Wrong document version number.
Error
164
Cannot remove document version.

DocumentManager.GetDocTypeGuidByFileName

Returns the GUID of the document type that matches the supplied filename.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
FileName
The file name for which the GUID of the corresponding document type should be returned.

Return Values

Result
Type/Value
Interpretation
Success
string
The GUID of the document type that can handle a file with this filename.
Error
56
Document type is not supported.
Tip

This method returns the document type configured as default document type in the Across system settings.

DocumentManager.GetDocumentAttachmentList

Returns a list of the attachments of a specific document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document for which the attachment list should be returned.

Return Values

Result
Type/Value
Interpretation
Success
string
The attachments as an XML structure. See below for information on the exact structure.
Error
16
Document does not exist.

The returned XML structure has the following layout:

<?xml version="1.0" encoding="UTF-16"?> 
<Attachments> 
    <Attachment Name="[File-Name]" ID="[DB-ID]"/> 
    <Attachment Name="[File-Name]" ID="[DB-ID]"/> 
    <Attachment Name="[File-Name]" ID="[DB-ID]"/> 
    ... 
</Attachments>
Tip

To save attachments, please see ObjectManager.SaveAttachment.

DocumentManager.GetDocumentComments

Returns the comments of a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
string
The comments as an XML structure. See below for information on the exact structure.
Error
16
Document does not exist.
Error
77
Cannot load comments.

DocumentManager.GetDocumentDeadline

Returns the due date of a specific document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
DateTime
The date and time of the deadline of the document.
Error
16
Document does not exist.

DocumentManager.GetDocumentDescription

Returns the description of a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
string
The description of the document.
Error
16
Document does not exist.

DocumentManager.GetDocumentLanguages

Returns all languages of the document. The source language is the first one in the list.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
string
A list of LCIDs, separated by semicolons.
Error
16
Document does not exist.

DocumentManager.GetDocumentName

Returns the name of the document with the specified GUID.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
string
The name of the document.
Error
16
Document does not exist.

DocumentManager.GetDocumentParagraphCount

Returns the number of paragraphs in a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
int
The number of paragraphs in the document.
Error
16
Document does not exist.
Error
180
The document is not ready because it is being checked in.

DocumentManager.GetDocumentProgress

Returns the progress of the document in percent.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
int
Method
The method to use to calculate the progress.
  • Values:
  • 1 - Atom state-based.
  • 2 - Involved task-based.
  • 3 - Child object-based.
Tip

Child object-based calculation returns the percentage of finished target languages.

Return Values

Result
Type/Value
Interpretation
Success
double
The progress of the document.
Error
16
Document does not exist.

DocumentManager.GetDocumentTemplateGuidByName

Returns the GUID of a document template according to its name.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
Name
The name of the document template.

Return Values

Result
Type/Value
Interpretation
Success
string
Contains the GUID of the document template.
Error
28
Document template does not exist.
Attention

Since this function has no parameter for the document type, it will return a document template with the specified name. In case there are multiple templates with the same name (e.g. "Default" for Visual XML and "Default" for Tagged XML), this function returns one of these templates. As it is undefined which one is returned in this case, it is advised to use GetDocumentTemplateGuidByName2.

DocumentManager.GetDocumentTemplateGuidByName2

Returns the GUID of a document template according to its name which belongs to a specific document type.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
Name
The name of the document template.
3
string
DocumentTypeGuid
The GUID of the document type to which the returned template belongs.

Return Values

Result
Type/Value
Interpretation
Success
string
Contains the GUID of the document template.
Error
28
Document template does not exist.
Error
56
Document type is not supported.

DocumentManager.GetDocumentVersions

Returns the versions of the document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
string
The versions of the document as XML.
Error
16
Document does not exist.

The timestamps in the XML follow a fixed format.

<?xml version="1.0" encoding="UTF-16" ?> 
<Versions> 
  <Version 
    Number="1" 
    CreationDate="2020-01-10T08:18:13" 
    ExpiryDate="2020-02-28T23:30:18" 
    Path="C:\Documents and Settings\[username]\My Documents\Across Project\Test Documents\test.docx" 
    FileName="test.docx" 
    Active="false"> 
    First version. 
  </Version> 
  <Version 
    Number="2" 
    CreationDate="2020-01-24T09:08:04" 
    ExpiryDate="" 
    Path="C:\Documents and Settings\[username]\My Documents\Across Project\Test Documents\test.docx" 
    FileName="test.docx" 
    Active="true" /> 
</Versions>

DocumentManager.GetDocumentWordCount

Returns the number of words in the document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
int
The number of words in the document.
Error
16
Document does not exist.

DocumentManager.GetDocumentWorkflow

Returns the workflow that has been assigned to the specified document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
string
The GUID of the assigned workflow.
Error
16
Document does not exist.
Error
24
Workflow does not exist.
Tip

Please note that this function returns an error in case no workflow is assigned to the document.

DocumentManager.GetFinishedDocumentLanguages

Returns the fully translated languages for a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
string
Contains the LCIDs of the completely translated languages separated by semicolons.
Error
16
Document does not exist.

DocumentManager.GetJobProgress

Returns the progress of a job. The function only works for jobs created from DocumentManager functions.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
JobGuid
The GUID of the job.

Return Values

Result
Type/Value
Interpretation
Success
int
The progress of the job in percent.
Error
17
Job does not exist.
Error
21
Job has been canceled.
Tip

Other return values are possible. They depend on the executed job and mean the job itself failed.

Attention

Do not use this method to find out whether a job is finished or not. A progress of 100 does not necessarily mean that the job is finished already. Use GetJobStatus instead.

DocumentManager.GetJobResult

Returns the result of a finished job. The function only works for jobs created from DocumentManager functions.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
JobGuid
The GUID of the job.

Return Values

Result
Type/Value
Interpretation
Success
The data of the job. The type of the return value depends on the job.
Error
17
Job does not exist.
Error
21
Job has been canceled.
Error
43
The job has not yet been completed.
Tip

Other return values are possible. They depend on the executed job and mean the job itself failed.

DocumentManager.GetJobStatus

Returns the status of a job. The function only works for jobs created from DocumentManager functions.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
JobGuid
The GUID of the job.

Return Values

Result
Type/Value
Interpretation
Success
int
The status of the job.
  • The following values are possible:
  • 0 - in progress
  • 1 - finished successfully
  • 2 - finished with errors
Error
17
Job does not exist.

DocumentManager.IsDocumentFinished

Returns whether a document has been completely translated or not.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
int/bool
  • 0 (false) if the document has not been completely translated

    otherwise

  • true if the document has been completely translated
Error
16
Document does not exist.

DocumentManager.RemoveDocument

Deletes an existing document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
31
Unable to delete document. More detailed information can be found in the error description.
Error
180
The document is not ready because it is being checked in.
Tip

The document is removed, even if there are not yet imported offline packages for it. Please use WanGridManager.GetListOfUnimportedOfflinePackages to check for not imported packages prior to removing the document.

DocumentManager.RemoveDocument2

Deletes an existing document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
bool
ForceRemoveUnimportedPackages
Specifies whether to remove the unimported packages or not.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
31
Unable to delete document. More detailed information can be found in the error description.
Error
180
The document is not ready because it is being checked in.

DocumentManager.RemoveDocumentAsync

Deletes an existing document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
bool
ForceRemoveUnimportedPackages
Specifies whether to remove the unimported packages or not.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
18
Unable to create job.
Error
180
The document is not ready because it is being checked in.

DocumentManager.RemoveDocumentPartitions

Removes the documents partitions.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
180
The document is not ready because it is being checked in.
Error
206
Cannot remove/create document partitions.
Error
217
Partitioning is not allowed for source document editing.
Error
228
Partitioning of tasks is not allowed by the Master Server.
Tip

This function is the same as calling CreateDocumentPartitions with PartitionsCount = 1.

DocumentManager.RenameDocument

Renames a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
string
Name
The new name of the document.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
40
Unable to rename document. More detailed information can be found in the error description.

DocumentManager.RunDocumentQmCheck

Runs a QM check for one target language of a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
int
TargetLanguageLcid
The LCID of the target language.
4
string
QmCheckGuid
The GUID of the QM check to run.

Return Values

Result
Type/Value
Interpretation
Success
int
The number of errors.
Error
15
Language does not exist.
Error
16
Document does not exist.
Error
56
Document type is not supported.
Error
180
The document is not ready because it is being checked in.
Error
207
The QM check could not be applied because the document does not support it.
Error
208
QM check failed.

DocumentManager.RunDocumentQmCheck2

Runs a QM check for one target language of a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
int
TargetLanguageLcid
The LCID of the target language.
4
string
QmCheckGuid
The GUID of the QM check to run.

Return Values

Result
Type/Value
Interpretation
Success
string
A string array containing the error messages.
Error
15
Language does not exist.
Error
16
Document does not exist.
Error
56
Document type is not supported.
Error
180
The document is not ready because it is being checked in.
Error
207
The QM check could not be applied because the document does not support it.
Error
208
QM check failed.

DocumentManager.SetDocumentDescription

Sets the description of a document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
string
DescriptionText
The new document description.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
222
Cannot set the document description.

DocumentManager.SetDocumentFinished

Sets the finished flag of the specified document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
bool
Finished
True if the document should be set to finished, false if it should be set to unfinished.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
110
Document cannot be finished.
Error
111
Document cannot be set to unfinished.
Error
112
Is not ready to be finished.
Error
180
The document is not ready because it is being checked in.

DocumentManager.SetDocumentFinished2

Sets the finished flag of the specified document.

Parameters

 
Type
Name
Description
1
string
ST
A security token for use in other crossAPI SI functions.
2
string
DocumentGuid
The GUID of the document.
3
bool
Finished
True if the document should be set to finished, false if it should be set to unfinished.
4
bool
WithParents
Specifies whether the parent objects will also be considered or not.

Return Values

Result
Type/Value
Interpretation
Success
Is always empty.
Error
16
Document does not exist.
Error
110
Document cannot be finished.
Error
111
Document cannot be set to unfinished.
Error
112
Is not ready to be finished.
Error
180
The document is not ready because it is being checked in.
Register for our Newsletter now

Our newsletter provides you with exclusive news about the Across Language Server, often even before the official announcement. The newsletter also provides you with early information on events, webinars, and training sessions.

  • Legal Notice
  • GTC
  • Privacy Statement
  • Cookies
  • info@across.net