Write Selected Beam Members to an Excel File (Tekla Open API - Tutorial)

_config.yml

What is the task at hand?

  1. The user selects some beams.
  2. We then want to collate the following information into various Excel spreadsheets:
    • Name
  • Profile

  • Length and finally Weight

  1. We want two views: the first aggregates the beams by their name and finish, and the second merely lists all the beams selected with the information listed above (length/weight etc).

The code is very dirty. There’s a lot of repetition here. And I’ve gone up some cul de sacs incorrectly. But that’s ok. It’s code which works. We can worry about refactoring for another day – in fact, that will make for a very good exercise. Here is the post which walks you through the refactoring process.

I’ll walk you through the code:

Here is the full code unencumbered by commentary:

Written on January 23, 2018