Create custom hatch patterns

Tekla Structures
Modified: 7 Mar 2025
2025
Tekla Structures

Create custom hatch patterns

You can add hatch patterns of your own manually in the hatch_types1.pat file.

Add hatch patterns

  1. Open the hatch_types1.pat file in a text editor.

    The file is located by default in the …\Tekla Structures\<version>\environments\common\system folder. Add your own patterns in the file and save it to a folder defined in your XS_PROJECT, XS_FIRM, XS_SYSTEM, or XS_INP folder.

    For details on file location, see Define hatches in drawings.

    Use the following syntax for your hatch pattern:

    *pattern-name[, description]

    angle, X origin, Y origin, X offset, Y offset, Dash1, Dash2,,,DashN

  2. Type the hatch pattern header line:

    A pattern definition starts with a header row. This starts with an asterisk (*) immediately followed by a name of no more than 31 characters (no spaces allowed). The name can be followed by an optional description for the pattern.

    Syntax: *pattern-name[, description]

    For example: *CHECKERED,Checkered plate

  3. Type the rows for the pattern:

    The rows following the header each define evenly spaced parallel lines used to create the pattern. Only one row is required but more complex patterns may require several rows.

    angle, X origin, Y origin, X offset, Y offset, Dash1, Dash2,,,DashN

    Syntax:

    0, 0.0, 0.0, 25.4, 25.4, 25.4, -25.4

    90, 12.7, 12.7, 25.4, 25.4, 25.4, -25.4

    See the example below for what this pattern looks like.

  4. Save the .pat file.

    Save the file to a folder defined in your XS_PROJECT, XS_FIRM, XS_SYSTEM, or XS_INP folder.

    A pattern with the defined header will appear in Tekla Structures in the fill type lists in drawing object properties.

    When you add the hatch in a drawing object, it is inserted at a particular point (the pattern origin), which will be a point on the boundary of the fill area. The area inside the boundary is then filled by infinitely repeating the lines defined in each row of the pattern definition along the local X and Y axes of the line. Each row in the definition can define a line with different local X and Y axes and different starting points relative to the pattern origin. In this way, a pattern can be developed consisting of any number of lines drawn in any direction.

Example of a custom hatch in a drawing polygon

This example describes how to apply the CHECKERED pattern in a drawing polygon.

The pattern is defined as follows:

*CHECKERED,Checkered plate

0, 0.0, 0.0, 25.4, 25.4, 25.4, -25.4

90, 12.7, 12.7, 25.4, 25.4, 25.4, -25.4

  1. In Tekla Structures, create a polygon in a drawing.

    The first point of the polygon will be the origin of the hatch pattern.

  2. Double-click the polygon to open its properties.
  3. Select CHECKERED as the fill type.
  4. Set the scale in X and Y to 1 and the angle to 0.
  5. Click Modify to apply the pattern.

The vertex surrounded by a red circle is the first point of the polygon and hence the pattern origin.

  • Consider the first line of the pattern definition:

    0, 0.0, 0.0, 25.4, 25.4, 25.4, -25.4

    • The 2nd and 3rd values define the X origin and Y origin. In this case, both are 0, so this line starts at the pattern origin. The angle is 0, so the line is oriented along its X axis. Since we have set the angle of the fill to 0 in polygon properties, this also corresponds to the global X axis of the drawing.

    • The 4th and 5th values (X offset and Y offset respectively) determine where copies of the line are placed. The first copy of the line will start 25.4 units in X and 25.4 units in Y from the origin. This is illustrated by the image below, where the black arrows represent the displacement from one line to the next, and the blue and red arrows represent the X and Y components of this displacement.

    • The 6th and 7th values are optional. If a line definition contains only 5 values, the line is a continuous line with no gaps. Dashed lines are created by adding pairs of positive and negative values. The positive values represent the length of the displayed sections of the line, and the negative values represent the length of the hidden sections. In this case, the line consists of a line segment of 25.4 units followed by a space of 25.4 units.

      This is illustrated in the following image:

  • The second line is rotated by 90 degrees, so it is running away from the pattern origin along the global Y axis of the drawing.

    90, 12.7, 12.7, 25.4, 25.4, 25.4, -25.4

    Its X origin is 12.7 and its Y origin is 12.7. This is illustrated in the following image:

Was this helpful?
Previous
Next