Getting Bolt Distances From Single Part (Beam) Drawings With an Output In Excel – Part 1 (Tekla Open API)

_config.yml

Every now and again we obtain a request from our readership to tackle a problem. If it is of general interest to the public and given our commitments we do sometimes oblige. Here is one such interesting problem. We will tackle this in three parts, and will focus on part 1 in this blog post.

  1. Get every SinglePartDrawing which name starts with “HEA/IPE/CC”
  2. Calculate the distance of every bolt distance from the start of the corresponding Single Part.
  3. Write the name of the Single Part and every bolt distance to Excel.
  4. Refactoring the code.

The first part is easy enough – and the code is pretty self-explanatory. We want to iterate through all the drawings and filter for the specific drawings that we are after.

In the next part, we will look at obtaining the relevant parts that we want and calculating the bolt distances from the start and end points. And finally, we will look at refactoring the code, because it is a little slow, and also from a maintainability point of view.

Written on November 29, 2017