Create a graphical template

Tekla Structures
Upraveno: 8 Bře 2024
2024
Tekla Structures

Create a graphical template

You can insert graphical templates (.tpl) in drawing layouts as tables, text blocks, or drawing headers, for example. You can also add graphical templates as elements in marks and associative notes.

We will create a drawing title block as an example of a graphical template. The title block contains drawing details such as the title, author name, scale, and date the drawing was created.
  1. On the Tekla Structures File menu, click Editors > Template editor.
  2. In Template Editor, click File > New.
  3. Select Graphical template.

    To create a new template based on a pre-defined template, select a file from the pre-defined templates section in the Template types dialog box.

  4. Click OK.

    An empty template opens in the template work area, and you can start adding content. If you selected a pre-defined template, the work area contains pre-defined content.

  5. Set or modify the template page settings and margin settings:
    1. Double-click the template to open the Template Page Properties dialog box.
    2. In the Output, Workarea, and Margins areas, modify the following:
      • Width and Height: Set in graphical units. The option to use page breaks if the page height is exceeded is selected by default. If this is not selected, no page breaks appear in the output.
      • View height: Set the page height for template design, but does not affect template output.

      • Margins: Set the margins for the left, right and bottom of the template in graphical units.

      • Use font CAP height: Set how the font size is calculated and output in graphical templates. It means that the text size will output exactly as defined. See Control font height in graphical templates for more information.

    3. Click OK to save the changes.
  6. Add a row in the template for the drawing title block.
    1. Click Insert > Component > Row.
    2. Select the content type for the row, and click OK.

      The content type that you select affects the template attributes that you can add in the value fields. In this example, we select DRAWING.

  7. Add the needed text labels to the row.
    1. Select the row and click Insert > Text.
    2. Type the needed text and click OK.

    3. Pick a location for the text in the row.
    4. To modify the text properties, double-click the text, adjust the properties, and click OK.

      For example, enter a name for the text object and change the font size. The name will be shown in the content browser.

      Pay attention to the content browser on the left while you are adding content to the template. It shows you the added content objects and allows you to quickly select and work with the content objects. When you select an object from the content browser, the object is also selected in the template.

      You can change the color of a text object. To do this, double-click a text object in the template, and in the object properties, click the button next to the font setting. Then click the color box and select a custom color.

    5. Add the rest of the text labels to the row in the same way.
  8. Add the necessary value fields to the row.
    1. Select the row, click Insert > ValueField and pick a location for the value field in the row.
    2. Select an attribute to add in the value field from the list of available attributes and click OK.

      In this example, we select NAME under PROJECT.

    3. Add other value fields in the same way.
    4. To modify the value field properties, double-click the value field.
      For example, change the value field name, font size, and allowed text length. The value field name will be shown in the content browser and in the template.

    5. Click OK.

    Here we have added the needed value fields to the row and modified the value field properties:

    The content browser shows the added content:

  9. Finalize the template.

    When you have the desired content in the template, you can make the template look nicer by repositioning labels and value fields, cropping the rows, or adding lines to separate the columns and rows. Cropping removes any unnecessary space from around the rows.

    • To crop the row, select the row, right-click, select Crop, and then select the desired crop option.
    • Drag the text labels and value fields to reposition them if necessary.
    • Draw lines in the template between columns and rows by using the graphical tools. You can double-click the created objects to change the color and other properties.

      You can change the color of a shape object. To do this, double-click a shape object, such as a line, and in the object properties, click the color box and select a standard color or a custom color.

      Here is the final template content:

  10. Save the template.
    1. Click File > Save as.
    2. Save the template in the model folder. If you want to use the template in other projects as well, save the template in the template folder defined for the advanced option XS_FIRM or XS_PROJECT.
    3. In the File name field, enter a name for the template.
    4. Click OK.
Here is an example of the created title block in a drawing:

Tip: Another way to create a new template is to open an existing template in Template Editor, modify the template as required, and save the template with another name.

In graphical templates, you can also import DWG/DXF files and use those as title blocks. For more information, see "Import DWG into Template Editor to create custom Title blocks".

Bylo to užitečné?
Předchozí
Další