AutoCAD drawing translation tools – Documentation

AutoCAD drawing translation tools icon Extract Translatable Text and Translate using Translation Table tools (TransTools for AutoCAD) provide an easy workflow for translating all translatable text in AutoCAD drawing(s) using a CAT tool or with the help of a standard two-column translation table.

Detailed information about Extract Translatable Text and Translate using Translation Table tools for AutoCAD

How Extract Translatable Text and Translate using Translation Table tools can help you in your work

Extract Translatable Text and Translate using Translation Table tools dramatically improve your translation speed and quality when dealing with AutoCAD drawings. Extract Translatable Text tool extracts all non-repetitive text shown on the drawing into a translation table in Word or Excel format, while Translate using Translation Table tool merges the translations from the final translation table back into the drawing, producing a fully translated drawing. Since AutoCAD drawings are not supported in CAT tools, this workflow will be very useful to all translators who need to translate AutoCAD drawings. It will also be useful for translators who do not use a CAT tool, since it allows to minimize time translating repetitive text.

TransTools for AutoCAD has the following features:

  • Process multiple layouts in the current drawing and/or multiple selections within the current drawing.
  • Batch-process multiple drawings opened in AutoCAD.
  • Support for TEXT, MTEXT, TABLE, DIMENSION, MULTILEADER and EXTERNAL REFERENCE objects.
  • All text is sorted by coordinates in top-to-bottom, left-to-right order (by X, Y and Z coordinates).
  • Text is extracted with formatting codes, making it easy to preserve formatting when the text is imported back into drawings with Translate using Translation Table.
  • Formatting codes are specially formatted to make it easy to differentiate between them and translatable text. Most formatting codes are marked with DO_NOT_TRANSLATE style in Microsoft Word translation tables, which is handy for Computer-Aided Translation users.
  • Option to process specific layers only (e.g. if the text you need to translate is in 'TXT_EN' layer).
  • Option to process text only (i.e. text objects containing letters as opposed to digits, punctuation marks, etc.).
  • Option to exclude text based on specific conditions (e.g., to ignore text like 'LG-123-456').
  • Configure the format of translation tables (optionally add layer or object type information).

Using Extract Translatable Text and Translate using Translation Table tools

How to run the tools

TransTools for Autocad works slightly differently under different versions of Autocad:

  • Autocad 2009 and newer versions:

    If you have AutoCAD 2010 or later, make sure that VBA support is installed as instructed here.

    TransTools for Autocad is controlled differently depending on your workspace settings:

    • Initial Setup Workspace (default): When this user interface is enabled, there are a number of tabs at the top of AutoCAD window (this user interface is also called “scenic ribbon”).

      To load TransTools for AutoCAD, click Load Aplication button [1] from Applications group under Tools tab, or type APPLOAD at the command prompt.

      Screenshot: Applications group in AutoCAD 2009 or later

      You will be presented with Load/Unload Applications dialogue. In this dialogue, select TransTools for Autocad.dvb from disk (if you used the automatic installer, this should be in your Documents\TransTools folder) and click Load button.

      Screenshot: Load-Unload Applications dialogue

      Click Close button at the bottom of Load/Unload Applications dialogue to continue. You need to perform this step each time you restart AutoCAD.

      When TransTools for AutoCAD has been loaded, you can finally run one of the tools. Click the small VBA button [2] located in Applications group under Tools tab, or type VBARUN at the command prompt.

      In the Macros dialogue, select either Trans_CollectUniqueValues (Extract Translatable Text tool which extracts text from the drawing) or Trans_Replace (Translate using Translation Table tool which merges text back into the drawing) and click Run.

      Screenshot: AutoCAD Macros dialogue

    • AutoCAD Classic workspace:

      To load TransTools for AutoCAD, select Tools -> Load Application... from the menu or type APPLOAD at the command prompt, then use the instructions above for loading TransTools for AutoCAD application file.

      To run the tools, open the Macros dialogue by clicking Tools -> Macro -> Macros... or type VBARUN at the command prompt, then follow the instructions above for running Extract Translatable Text or Translate using Translation Table tools.

  • Autocad 2008 and older versions:

    To load TransTools for AutoCAD, select Tools -> Load Application... from the menu or type APPLOAD at the command prompt, then use the instructions above for loading TransTools for AutoCAD application file.

    To run the tools, open the Macros dialogue by clicking Tools -> Macro -> Macros... or type VBARUN at the command prompt, then follow the instructions above for running Extract Translatable Text or Translate using Translation Table tools.

Note: If you want to load TransTools automatically every time AutoCAD starts, add it to Startup Suite: open Load/Unload Applications dialogue as explained above, click Contents... button, and click Add... to select TransTools for Autocad.dvb from disk:

Screenshot: Startup Suite dialogue

Prerequisites: Visual Basic for Applications (VBA) support in AutoCAD

Extracting translatable text using Extract Translatable Text tool

To extract translatable text from a drawing, run Extract Translatable Text tool as described above. You will see the following dialogue:

Screenshot: Extract Translatable Text dialogue

  1. Select one of the options depending on where the text is located:

    1. Option 1 – Full Layout(s) (default) – choose this option if you want to extract all text from specific layouts of the current drawing.

      Screenshot: Extract Translatable Text option 1

      Check (tick off) the appropriate layouts. Use All and None buttons to check or uncheck all layouts at once.

    2. Option 2 – Selection(s) - choose this option if you would like to process multiple selections or layouts in the current drawing. This should be useful if your drawing has viewports and only portions of text need to be translated.

      Screenshot: Extract Translatable Text option 2

      Select the appropriate layout from the drop-down list and click Select Objects... to select specific objects on this layout (see below for more information) or Select Layout to select everything on this layout. Each selection will be added to the list below, so you will be able to select as many layouts or selections as you want.

      Selecting objects:

      When you click Select Objects..., the dialogue will temporarily disappear and you will be able to select the desired text.

      • Left-click at the top-left corner of the area you want to select, a small distance away from the very top-left object that you want to include in the selection. Then, move the mouse down and to the right until the selection fully covers the text objects, and then release click the left mouse button again. You may use the mouse wheel while dragging the mouse in order to zoom in/out on a specific area of the drawing.
      • Left-click at the bottom-right corner of the area you want to select, move the mouse up and to the left until the selection at least partially overlaps all text objects you want to select, and then click the left mouse button again. With this selection method, unlike the one above, you only need to select a part of a text object and it will be included in the selection.
      • Rotate the mouse wheel up or down to zoom in/out. While you do this, try to move the mouse closer to the objects you want to center the view on.
      • Left-click individual objects to add them to the selection set.
      • Hold down the Shift key and left-click individual objects to remove them from the selection set.
      • Hold down the mouse wheel and move the mouse cursor in any direction to scroll (pan) up/down/left/right.
      • Double-click the mouse wheel to zoom the drawing to its extents (i.e. zoom the screen to include the entire drawing).

      Press Escape if you have selected wrong objects and would like to start again (this will return you to the Options dialogue). Press Enter when you have fully selected all objects to process (this will return you to the Options dialogue).

      To remove a specific selection you made, select the item from the list and click Remove. Click Clear to remove all items if you would like to start from scratch.

    3. Option 3 – Many drawings – this option allows batch processing of several drawings opened in Autocad.

      Screenshot: Extract Translatable Text option 3

      In the list you will see layouts of every drawing currently opened in the same AutoCAD application window (i.e. all drawings you can see under AutoCAD Window menu).

      Check the appropriate layouts manually or click All / None buttons to check or uncheck all layouts at once.

  2. Extract all text (including repetitions) for calculating statistics: By default, only unique text is extracted from the drawings. However, if you need to calculate the amount of text for charging your clients, you need to see all the translatable text, including repetitions. To do this, check this option. Note: when you use Translate using Translation Table tool to translate the drawing based on such translation table, only the first occurrence of each repeating entry will be used for translation, all others will be ignored.
  3. Export basic formatting only: By default, meaningful text is extracted along with format codes that control the formatting of Autocad objects. This allows to restore the original Autocad formatting during the translation operation. However, sometimes you may need to put text back in the drawing manually, i.e., without using Translate using Translation Table tool (for example, your company has a large drafting department with people who are responsible for this). In such cases, click this option.
  4. Extract text only: If this option is checked (default), the program exports only text containing alphabetic letters. If it encounters text that contains only numbers, punctuation characters or special symbols, it skips such text. If you want to process all text, including fully numerical text, etc., uncheck this option.
  5. Process specific layers only: Use this option if you need to translate text that is located in specific layer(s).

    Screenshot: Layer filter

    When you select this option, you will see two lists.
    The left-hand list is the list of layers that need to be processed. If this list is empty, all layers will be processed.
    The right-hand list contains all layers within the current drawing.
    Click <-Add to add a specific layer to the list of layers you want to process (left-hand list). In batch-processing mode, you can also use Add custom button to add a layer that is not present in the current drawing. Click Remove-> to remove a layer from the list of processed layers.

  6. Exclude text objects matching specific conditions: Use this option if you would like to skip objects whose text satisfies certain conditions (specified by a regular expression). E.g., you do not want to translate equipment numbers like 'PT-289' or line numbers like '067-DDD-056-D28', etc.

    Screenshot: Exclusion filter

    When you select this option, you will see a list of 'masks', or conditions. There is one default condition that excludes equipment tag numbers like 'PT-255', 'L-2455', etc from the Translation Table.
    Click Add to add a new condition; Edit to modify a condition from the list; Remove to remove a condition; To Clipboard to save all conditions to the clipboard for use later; From Clipboard to import conditions that were created earlier.
    For more information on creating such conditions, refer to the conditional filter section at the bottom of this page.

  7. Translation Table format: the format of the translation table generated by this command can be configured.

    Screenshot: Translation Table Format properties

    Click Modify to change the translation table format settings.

    You have the following options:

    1. Format: Word or Excel.
    2. Include file path: this prints the full path to the processed drawing inside the translation table for easy reference.
    3. Include text information: this exports additional information on extracted text (layer and type of object, i.e. TEXT, TABLE CELL, DIMENSION, etc.).
    4. Prepare for CAT tool (Word format only): use this setting to prepare the translation table for importing into a CAT tool. You have several options:
      • Do not prepare (No CAT tool) – Use this option if the translation table does not need to be prepared for a CAT tool. If you use a CAT tool, the best way to translate the table is to copy the Translation column into a new document, translate the document, and then paste the translated cells over the cells in the Translation table so that you have source and translation side by side.
        This is the default option.
      • SDL Trados Studio, memoQ, Wordfast Pro, Wordfast Classic – If you use one of these options, TransTools will use tw4winExternal style to hide non-translatable parts of the table (i.e., instructions, heading row, original column and columns with extra information) and tw4winInternal style to mark formatting codes as non-translatable text. These options are recommended if you use one of these CAT tools. The translation table can be used inside your CAT tool without any extra preparation. After the translation table is translated and exported from your CAT tool, you can use it to merge translations into the drawing without any extra steps.
      • Memsource Cloud, Déjà Vu X3, Cafetran Espresso, CAT tool with hidden text filtering support – If one of these options is used, TransTools will use hidden font formatting to hide non-translatable parts of the table and hidden font formatting to mark formatting codes as non-translatable text. The translation table can be imported into your CAT tool without any extra preparation. When you import it into your CAT tool, make sure that hidden formatting is ignored in the file import settings.
      • Other CAT tool – When this option is selected, no extra formatting is applied to the translation table (besides special formatting of the formatting markers), so it is recommended to copy the Translation column into a new Word document, translate this document in your CAT tool, and then paste the translated cells over the cells in the Translation column before copying source and translation columns to the clipboard.
    5. Automatically save generated table in drawing's folder: if you check this box, TransTools will save the generated Word document automatically under the same location as the current drawing (with the same file name but with DOCX/DOC extension). This is possible if you use Option 1 (Full Layouts) or Option 2 (Selections).

When the appropriate options have been selected, click Start to generate a translation table which will be opened inside Microsoft Word or Excel (and saved if the appropriate option is activated). To exit, click Close.

When the translation table is created, you will see a notification. If any text was excluded using the conditional filter (item 6 above), you will see View Exclusions... button. When you press it, you will see all text that was skipped due to the conditional filter. Review this list to make sure your conditional filters work as intended.

AutoCAD formatting

When the drawing is output into Microsoft Word or Excel, you will see specially formatted codes inside the text. These are Autocad formatting codes and special codes used by TransTools for Autocad:

Original text:
This is standard text
This is bold text
This is italics
This is pink text

Extracted text:
\A1;\pxsm1,qj,t62;This is standard text\P\ps*,q*,tz;{\fVerdana|b1|i0|c0|p34;This is bold text\P\fVerdana|b0|i1|c0|p34;This is italics\P\fVerdana|b0|i0|c0|p34;\H1.4x;\C6;This is pink text}

These codes are very important, since they are used to restore the original formatting when the translated text is merged back into the drawing with Translate using Translation Table tool. When you translate the translation table, do not touch these codes unless you know how to remove them and you find them unnecessary (e.g. you can remove \P which means a line break).

Here is a list of codes you can remove or add depending on context:

  • \P – line break
  • %%D – degree symbol

Update for version 1.5 and higher: Starting with version 1.5, TransTools can prepare the translation table (in Word format only) for translation inside a CAT tool. For SDL Trados Studio, memoQ and Wordfast Pro / Classic, it uses tw4winInternal for AutoCAD formatting markers. For CAT tools that can skip hidden formatting (Memsource Cloud, Déjà Vu X, CafeTran Espresso, among others), it useshidden font formatting instead. This way, formatting markers are converted into tags inside your CAT tool, making them easier to handle during translation and enabling tag verification inside your CAT tool or an external QA tool.

memoQ

For memoQ users:
If you use memoQ, I have prepared a special import filter for you which will make it easier to translate the generated translation tables in Word format. In addition to handling AutoCAD formatting markers, it also converts additional codes (\P, <br>, <tab> and %%D) into blue memoQ tags. Follow these instructions to obtain and use the import filter:

  1. Download the filter and then extract the MQRES file from the ZIP archive.
  2. In memoQ, open the Resource Console and switch to Filter Configurations section.
  3. Click Import New.
  4. Choose the extracted “autocad-tables-cascading-filter.mqres”, optionally rename the filter in the next window and click OK. In the future, steps 1–4 will not need to be performed because the filter will now reside in your memoQ configuration.
  5. In your project, load the translation table document using Import With Options command. You will see Document Import Options dialogue. For the document, choose Cascading Filter in the Filter column, and “AutoCAD Translation Tables (cascading)” from the Configuration column. Click OK to import the document.
  6. Now \P and %%D codes will be shown as blue tags, while formatting codes will be shown as pink tags ({0}).

Conditional filter

Conditional filters (under “Exclude text objects matching specific conditions”) provides you with a lot of control over what text is extracted from a drawing.

When a condition matches the entire text of an AutoCAD object (like MTEXT, table cell, DIMENSION, etc.), such text will not be added to the generated translation table.

Conditions (masks) are defined using VBScript Regular Expressions syntax. For more information on how to create custom conditions, click here.

When you click Add or Edit buttons in the conditional filter (item 6 above), you will be presented with the following dialogue:

Screenshot: Exclusion editor

Enter the name of the condition in the Name field.

The condition itself must be entered in the Mask field. A condition is composed of segments that match a number of characters in the text. For example, 'C' matches letter 'C', and C{2,3} matches 2 or 3 letters 'C' in a given position within the text. If all segments sequentially match parts of the complete text, the condition matches the text and this text will be excluded from the Translation Table.

The Exclusion Condition Editor provides a rather basic interface for constructing conditions, but it should be adequate for most users:

  • Letter(s): click this button to insert a letter, either an English letter or any letter from any alphabet. Specify how many times this letter can occur in the position within the complete text. Click Insert to insert the segment in the condition at the position of the caret;
  • Digit(s): click this button to insert any digit (0-9) or one of specific digits;
  • Character(s): click this button to insert any character or one of specific characters (including punctuation, special symbols, etc.).

Here are some examples of conditions that may come in handy:
[0-9]{3}\-[a-z]\-[0-9ABC/]{3,9} – this condition matches equipment numbers like '040-H-001A/B/C';
40(\-[A-Z0-9]{1,5})+ – this condition matches line numbers like '40-AM-50-50012-J10A';
(AG|UG) – this condition matches 'AG' (aboveground) or 'UG' (underground)
[a-z]{2} – this condition matches 2-letter tag numbers like 'LG' (level gauge), 'PT' (pressure transmitter), etc.

Be careful, it is better to remove unwanted rows from the generated translation table manually than to create 'loose' conditions that can prevent some translatable text from being added to the translation table.

To test the expression you created, type the text you want to skip. If you see 'Text matches mask', your condition should be complete. However, make sure your condition works correctly by clicking View Exclusions button at the bottom of Extract Translatable Text dialogue after you generate the translation table.

Click Save to save the condition, or Cancel to exit without saving changes.

For more information on Microsoft Regular Expression syntax used to construct conditions, refer to this page.

Translating the translation table

There are several efficient ways to translate the translation table:

  • If you do not use a CAT tool, simply translate the source text inside the 2nd column.
  • If you use a CAT tool:

    • If the translation table is in Word format, simply import it into your CAT tool like any document. For this to work, make sure that Extract Translatable Text tool is configured to generate a translation table for your CAT tool.
    • If the translation table is in Excel format, copy the translatable cells from the 1st column to the 2nd column, then hide rows 1 to 3 and all columns except the Translation column. Translate the document in your CAT tool (the CAT tool should ignore hidden rows and columns by default). When the translated document is exported from the CAT tool, unhide the first column so that you can see both source and translation columns side by side in order to be able to copy both to the clipboard.
    • If your CAT tool is not listed among the options in Extract Translatable Text tool (for translation tables in Word format) or if your CAT tool does not support hidden rows/columns in Excel, you can copy the translatable cells from the 1st column into a separate document, translate it, then paste the translations into the 2nd column of the translation table, making sure that the source and target cells align correctly.

Translating drawing(s) using Translate using Translation Table tool

To translate a drawing using the final translation table, run Translate using Translation Table tool as described above. You will see the following dialogue:

Screenshot: Translate using Translation Table dialogue

  1. Select one of the options depending on where the text is located:

    1. Option 1 - Full Layout(s) (default) – choose this option if you want to extract all text from specific layouts of the current drawing.

      Screenshot: Extract Translatable Text option 1

      Check (tick off) the appropriate layouts. Use All and None buttons to check or uncheck all layouts at once.

    2. Option 2 - Selection(s) - choose this option if you would like to process multiple selections or layouts in the current drawing. This should be useful if your drawing has viewports and only portions of text need to be translated.

      Screenshot: Extract Translatable Text option 2

      Select the appropriate layout from the drop-down list and click Select Objects... to select specific objects on this layout (see below for more information) or Select Layout to select everything on this layout. Each selection will be added to the list below, so you will be able to select as many layouts or selections as you want.

      Selecting objects:

      When you click Select Objects..., the dialogue will temporarily disappear and you will be able to select the desired text.

      • Left-click at the top-left corner of the area you want to select, a small distance away from the very top-left object that you want to include in the selection. Then, move the mouse down and to the right until the selection fully covers the text objects, and then release click the left mouse button again. You may use the mouse wheel while dragging the mouse in order to zoom in/out on a specific area of the drawing.
      • Left-click at the bottom-right corner of the area you want to select, move the mouse up and to the left until the selection at least partially overlaps all text objects you want to select, and then click the left mouse button again. With this selection method, unlike the one above, you only need to select a part of a text object and it will be included in the selection.
      • Rotate the mouse wheel up or down to zoom in/out. While you do this, try to move the mouse closer to the objects you want to center the view on.
      • Left-click individual objects to add them to the selection set.
      • Hold down the Shift key and left-click individual objects to remove them from the selection set.
      • Hold down the mouse wheel and move the mouse cursor in any direction to scroll (pan) up/down/left/right.
      • Double-click the mouse wheel to zoom the drawing to its extents (i.e. zoom the screen to include the entire drawing).

      Press Escape if you have selected wrong objects and would like to start again (this will return you to the Options dialogue). Press Enter when you have fully selected all objects to process (this will return you to the Options dialogue).

      To remove a specific selection you made, select the item from the list and click Remove. Click Clear to remove all items if you would like to start from scratch.

    3. Option 3 - Many drawings – this option allows batch processing of several drawings opened in Autocad.

      Screenshot: Extract Translatable Text option 3

      In the list you will see layouts of every drawing currently opened in the same AutoCAD application window (i.e. all drawings you can see under AutoCAD Window menu).

      Check the appropriate layouts manually or click All / None buttons to check or uncheck all layouts at once.

  2. Translation Table: Select the fully translated translation table file in Microsoft Word or Microsoft Excel format.
  3. Change characters that are not supported in every font:
    Use this option if your drawing uses a font like “romans” which does not include some Unicode characters like EN-dash and №, displaying question marks (?) instead. When this option is checked, TransTools will modify the translation text, replacing the specified characters with alternative text. For example, you can replace EN-dash (–) with a regular hyphen (-).
    To specify replacement characters, press Configure... button. You will see the following dialogue:

    Screenshot: Character replacement editor
    All changes made in this list are automatically saved for future sessions.

  4. Process specific layers only: Use this option if you need to translate text that is located in specific layer(s).

    Screenshot: Layer filter

    When you select this option, you will see two lists.
    The left-hand list is the list of layers that need to be processed. If this list is empty, all layers will be processed.
    The right-hand list contains all layers within the current drawing.
    Click <-Add to add a specific layer to the list of layers you want to process (left-hand list). In batch-processing mode, you can also use Add custom button to add a layer that is not present in the current drawing. Click Remove-> to remove a layer from the list of processed layers.

When the appropriate options have been selected, click Start.

If some text from the drawing was not found within the Translation Table, you will see View Skipped Text button at the bottom of the dialogue. Clicking this button will open a dialogue with a list of all such text.

To exit, click Close.