Canada Custom Variables

Tekla Structures custom attributes Reporting template attributes
2025
Tekla Structures
2024
Tekla Structures
2023
Tekla Structures
Environment
Not environment-specific
Canada (Imperial)
Canada (Metric)

1. Purpose and description

This set of custom variables extends the reporting capabilities of Tekla Structures. These variables are available throughout the system: reports, marks as templates, drawings, .Net API, filtering, object representation, etc…

 

2. System requirements

Environments: Any

Languages: ENGLISH

3. Installation

To install the application:

  1. Download the TSEP file in Tekla Warehouse.
  2. Run the downloaded TSEP and select the Tekla versions to install to (Tekla restart is required).
  3. Open Tekla Structures and use the attributes in object filtering or template editor.


 

4. Usage

To use the application:

  1. You will need to have the prefix “CUSTOM.” in front of each variable where used.
  2. Some of these variables rely on certain user-defined attributes to be used that come with Tekla Structures common environments. These are specified for each case.
  3. The output of these variables will be default metric, the same as any other system template variables. The output can be customized using the template editor formatting (E.g. Length -> ft-in -> 1/16”).  To use these variables in the Organizer they would need to be added manually (see TUA article - Create a custom property in Organizer).
  4. These new variables are added to the contentattributes_custom_canada.lst under environments/Common/Template/settings/ . If you are using environments containing a local copy of  contentattributes.lst ,add a new line to include contentattributes_custom_canada.lst.  
Image
Canada env contentattributes lst screenshot

 

Custom Component Specific

The following attributes are meant to be used inside custom components and allow the user to set values into the position attributes of parts. 

Image
Part position attributes

 

The value assigned to an object use specific user-defined attributes. These user-defined attributes must be used in order for the custom attributes to work properly (it is already included  in the TSEP package)

Image
Part UDA

Those user-defined attributes are already included in the TSEP package.

The inp file is placed into TeklaStructures\version\Environments\common\system. If the environment you use doesnt actually load this folder by default, the attributes definition file can be download at the top of the article.

 

CategoryNameTypeRow TypeDescription
PARTCUSTOM.CC_PART_ROTATIONIntegerNA

Get the value from a part’s user-defined attribute BPC_ROTATION  and set it as the Rotation value in the part’s position properties.
UDA value meaning:

0 return Front

1 return Top

2 return Back 

3 return Below

PARTCUSTOM.CC_PART_ON_PLANEIntegerNA

Get the value from a part’s user-defined attribute BPC_ONPLANE and set it as the On plane value in the part’s position properties.
UDA value meaning:

0 return Middle

1 return Right

2 return Left 

 

PARTCUSTOM.CC_PART_AT_DEPTHIntegerNA

Get the value from a part’s user-defined attribute BPC_ATDEPTH and set it as the At depth value in the part’s position properties.
UDA value meaning:

0 return Middle

1 return Front

2 return Behind

PARTCUSTOM.CC_PART_AT_DEPTH_OFFSETDoubleNAGet the value from a part’s user-defined attribute BPC_ATDEPTH_OFFSET and set it as the At depth offset value in the part’s position properties.
PARTCUSTOM.CC_PART_ON_PLANE_OFFSETDoubleNAGet the value from a part’s user-defined attribute BPC_ONPLANE_OFFSET and set it as the On plane offset value in the part’s position properties.
PARTCUSTOM.CC_PART_SET_ROTATIONDouble Get the value from a part’s user-defined attribute BPC_ROTATION_VALUE and set it as the Rotation angle value in the part’s position properties.

Those custom attributes are setting a value to an object rather than returning a value just like other regular attributes. They are not meant to be use in reports, template or filters.

 

Using in a custom component

  1. You need to create one parameter for each value you want to be able to control into the part .

    (rotation, rotation angle, depth position, depth offset, on plane position or on plane offset)

    Those will be used to set values into a part's position attributes.

Image
CC_step_1_custom_variable.png

Parameter's value type must be LENGTH for parameters controlling the On plane offset and At depth offset. Parameters for the position At depth, On plane and Rotation must be a NUMBER value type.

For the rotation angle (represented by SetRotation in the above example), the parameter's type  must be Angle.

  1. Now, we need to create the same amount of parameters as above using the same value type in order to parse their values into a part's position attributes. If you want to control the rotation angle, you need to add one extra parameter to convert the data into radiant (P7 in the below example). 

    Those parameters will use the fTpl function and be hidden. The Tekla Structures function fTpl() is normally used to retrieve the value of a template attribute for a specific object, identified by its object GUID but in this specific case, we are using it to return a value to a specific object. 

     

Image
CC_step_2_custom_variable

 

  1. Finally, we need to assign the parameters created to their respective attributes in the object.
Image
BPC_Can var cc_step 3

 

The final result is like shown below:

An example custom component can be download at the top of the article. (Version 2025 only)

 

At the moment,the rotation  is only applicable to beam objects

 

Steel Specific

CategoryNameTypeRow TypeDescription
BOLTCUSTOM.Bolt_Connect_AsIntegerBoltGroupIntended for bolt group objects only. Returns 1 if bolt connect as sub-assembly, 0 if bolt connect As secondary part.
  stringBoltGroupIntended for bolt group objects only. Returns "As sub-assembly" if bolt connect as sub-assembly or  "As secondary part" if bolt connect As secondary part.

 

CategoryNameTypeRow TypeDescription
PARTCUSTOM.SHAPE_WIDTHDistancePartIntended for shape items only. Returns the width of a shape item trimmed using line cut(s) along their length.
📌 Overview

 

When modeling grating using shape items in Tekla Structures, many users expect to find a simple attribute like “Width” — but by default Tekla does not provide a direct property for item width.

Instead, width values have to be inferred from geometry or bounding boxes, which can be misleading if the part is skewed, rotated, or not aligned with global axes.

To solve this gap, we’ve created a custom property plugin that introduces a new attribute:

🔹 CUSTOM.SHAPE_WIDTH
This attribute automatically returns the true width of a shape item or part using its local coordinate system.


⚙️ How It Works
  • Tekla does not have a built-in “Width” field for shape items.
  • This plugin calculates it manually by:
    1. Retrieving the local coordinate system of the part.
    2. Setting a temporary workplane aligned with the part axes.
    3. Extracting the solid geometry (with cuts/fittings included).
    4. Measuring the bounding box range along the local Y-axis → this is the width.
📊 Usage
  • Reports → Returns a numeric width (e.g., 817.40 mm).
  • Drawing marks / templates → Returns the width as text (817.40).
  • Both metric and imperial units are supported automatically, based on model settings.

🚧 Notes & Limitations
  • By default, Tekla Structures total get the width of a shape item excluding any cuts. This plugin fills that gap.
  • Native Tekla attributes like WIDTH exist for beams and plates, but not for shape items such as grating.
  • Drawing marks can only consume the string property version.

👉 This attribute helps estimators and detailers by providing reliable grating widths directly in reports, templates, and drawings without manual measurement or workarounds.

 

 

Was this helpful?