Month: September 2017

  • Copying From Object To Object – Tekla Open API (Code Snippets + Video)

    An example of us copying a column from one object, to the rest – to the rest of the beams.

    What is the task at hand? We want to make the Copy Object To Object command more efficient

    There is a nifty little command – little oft used in Tekla. The “Copy Object To Object” command. It’s handy, but it could be made better: all the model objects have to be selected individually. That can be a little bit of a pain. In this lesson we will create some code, using the Open API, to allow users to select multiple objects (all at once) by which the copy object to object command can be applied to.

    Where is the pertinent Call in the API? I’d prefer this type of thing to be a method on the relevant ModelObject. But it’s static method in the Operation class. Here is the hello world example, straight from the documentation:

    Copying Object to Object – Hello World Example:

    This is fantastic! Now let us outline what we want the command to do:

    What do we want our command to do?

    1. We want the user to select an object (or group of objects).
    2. We then want the user to select a “source” object.
    3. We want the user to then select all objects to copy to.
    4. The program should then use the parent object as a source, and use that as a reference to copy everything selected in step #1 to all the objects selected in step #3.
    1. Ask the user to select a bunch of model objects – The objects to copy

    We can use the Picker class, located in the Tekla.Structures.Model.UI namespace. And there is a handy object which thankfully has been exposed: PickObjects(Picker.PickObjectsEnum, String). This returns a ModelObjectEnumerator which we can iterate over.

    2. Ask the user to select the source object:

    You can get the source object in the same manner as the above code – except you would use the PickObject method instead of the PickObjects (plural) method.

    3. Ask the user to select the objects to copy to:

    We can use the same method used in step 1.

    4. Copy from Object To Object

    The rest is as easy as A-B-C:

    5. Finally, we want to Redraw Views after the Copying Operation has completed

    Video demonstration

    …That’s all folks. Hope you learned something!

  • Dimensioning Bolts in a Tekla Drawing – Tekla Open API – (Demo + Code snippets)

    The picker can’t pick multiple items.

    We want to create a little drawing plug-in

    What we want to do is to select and dimension all the bolts to a particular grid line. Here’s how it should work:

    * The user selects a group of bolts.
    * The user selects a gridline.
    * Dimensions are drawn from the Bolts to the Gridline.

    But quelle surprise – the Tekla API doesn’t expose an object which can select or pick multiple drawing objects.

    What are some solutions around this problem?

    We’ll we’re gonna have to be a little creative. Thankfully, Trimble have exposed the ability to programmatically obtain drawing objects. Given these objects we need to somehow filter out the stuff we want to dimension. Here are some possible ways:

    • We could provide a Control where we can choose and filter what objects we want to dimension, after reading/seeing it’s properties in some type of user interface (you could have a WPF application and use its fancy data binding ability + MVVM pattern + Command objects working with Service layers and Messengers) – but that would require considerable effort.
      You could just select everything individually. But that would take forever.
    • You could extend the PickerInputWithinAView abstract method to allow you to select multiple objects.
      Or you could find a way to easily filter it all. And I think I’ve found a way.
    • Deep in the annals of the Tekla API Reference Guide, I found that the Picker type exposes the PickTwoPoints method. And if we can pick two points, then we can certainly filter our selections.

    Issues In the Algorithm We Need to Address

    1. User picks two points.
    2. User picks a gridline
    3. We then filter all bolts within the bounding box of the original two picked points, and we create dimensions to the appropriate gridline. We need to understand the Drawing API.
    4. We also need to know about saving and reverting transformation planes.
    5. This is the hello world version of what we are trying to do, but perhaps on a scale that is a little more grand. We need some basic code on how to create dimensions.

    How to Programmatically Pick Two Points

    How to programmatically select a grid line

    Warning – I no longer recommend this approach because it is very, very difficult to actually select a bolt. A better approach would be to select a point, and programmatically filter to get the grid line you want.

    Understanding the Tekla Drawing API

    Please refer to the below diagram.

    Tekla Drawing API structure
    An Explanation of how the Tekla API categorises its objects.

    The things that you see in the drawing, are not exactly what you can see on the model. They are drawing representations of what you see in the model. If you want specific geometry based information concerning what you see in the drawing you must:

    1. First get the drawing object (i.e. the drawing representation you see as a Bolt in the drawing).
    2. Then you must get that same Bolt in the model.
    3. You must then inquire in the model about the particular attributes or positional properties of that bolt – which is represented as a bolt in the drawing.
    4. You must also bear in mind that Views etc have their own coordinate system. So if you may need to translate any differences which exist in the model to the local coordinate system of the particular view you are using. You can set and retrieve the transformation plane like so:

    How to Save And Revert Transformation Planes

    5. So if you need to create some dimensions, the exact lengths etc must be derived by querying the pertinent model object representations of what you see in the drawing.

    How to Create some Dimensions

    Dimesnions Explained
    The diagram provides a handy summary and visual representation of the parameters you need to pass in when creating a set of dimensions using the Tekla Open API.

    How to get the drawing objects (in this case bolts) and programmatically filter them out

    A Primer on how the Tekla.Structures.Drawing namespace is structured

    Firstly you have a Drawing class. There are many types of drawing sub-classes:

    * AssemblyDrawing
    * CastUnitDrawing
    * GADrawing
    * MultiDrawing
    * SinglePartDrawing

    Within each drawing is what is called the ConatinerView. A sheet is a container view. A container view is simply – if I were to use an everyday metaphor if you were grocery shopping – a bag which you can use to put: (i) other bags or (ii) shopping items inside. In order to get the ContainerView object, you can use the Drawing.GetSheet method – and you will be returned a ContainerView object.

    Inside a container view you can typically:

    * GetObjects()
    * Or you can GetAllViews
    * Or you can GetAllObjects of a certain type.

    And within the container view, using some of the above methods you can get all sorts of DrawingObjects:

    * DetailMark
    * Dimensions etc
    * Drawing representations of ModelObjects – like: Bolts, Connections, Grids, Gridlines, Parts, Welds etc.

    Put all the elements together

    If you put all the elements together, you can create some powerful little Plugins. I can’t post the full code because my boss will murder me, so I’ve done my best to teach you the key elements so you can create something powerful yourselves.

    The Demo

    Here is the video demonstrating it in action:

    Tekla Open API Plugin – Dimensioning all selected bolts from Tek1 on Vimeo.

    Thank you for watching!

    I hope you learned something from this post.

  • How to programmatically insert Reference Models into Tekla (Tekla Open API)

    Wouldn’t it be handy if we could programmatically insert reference models into Tekla? Well you can now do so quite easily.

    Here is the code which does the hard work. (You will of course add the appropriate references and directives):

    And if you want to see a video demonstration, here it is:

    Inserting XRefs into Tekla as Reference Models from Tek1 on Vimeo.

  • Bubble Deck Panel Outline – Fire Collar Clash Check (Precast – Bubble Deck)

    We’ve been noticing an increasing problem in that certain items are clashing with BubbleDeck Panel outlines. In order to eliminate these types of errors we’ve instituted a new check in our procedures. Everyone is now required to specifically check for this type of situation. This adds to our check list which is already quite long. I go into further explanations below in a video.

    Fire Collar Clash Check with Panel Outline. This is becoming a problem so it is now a check against it.

     

    Bubble Deck – Clash Check With Panel Outline from Tek1 on Vimeo.

     

  • Finding Blocks “Colliding” with Shear Lig Points (AutoCAD .net, Precast – Bubble Deck)

    Showing Blocks Close To Shear Lig Points

    It’s a common problem apparently. There are far too many block references placed a little too close to those pesky shear lig points. It takes discipline, but when you have 5-10 people all working on the same drawing, with different practices, it’s something that’s really easy to miss, but really expensive to discover.

    So I developed a tool to take care of it.

    Here is the video demo:

    Checks for Clashes against Shear Lig Points from Tek1 on Vimeo.

    Thanks for stopping by!

  • How Tek1 solves the problem of Ordering Items in Precast Panel Detailing Projects (Precast)

    Demonstrates the output of Tek1 Order forms – in precast projects.
    Counting Items is difficult

    Ordering parts in precast panel projects is tricky. You need a BOM (Bill of Materials). You need to know what you need and how much. When there are thousands upon thousands of parts – that can be a very tricky endeavour.

     Why should you bother counting inventory?

    It all comes down to money. And how much of it you tie up in your inventory. And how quickly you’re gonna use it. Financial liquidity is like blood and oxygen. Without it, no organisation can survive. And you can maximise your liquidity (and profits too) if you manage your inventory well. You should be able to answer these questions:

    • How much inventory did you pay for?
    • How much inventory is in your shop?
    • How much did you use up in your projects?
    How Tek1 solves inventory problems: Demo Video

    We give you accurate numbers about what you’ve ordered. And what you need to order. This is how we come up with a Bill of Materials:

     

     

     

  • Connection Side Mark on Dimension Lines (Tekla Tips)

    How to add a connection side mark on Tekla drawings in structural steel drawings.

    Switching on the connection side mark on the part properties in Tekla drawings sometimes can crowd the drawing.

    You can select the Plate side marks “Type” to “Automatic” to set the connection side marks on the dimension line itself.

    One additional advantage is that it will also tell whether the dimension is actually put on the connection side. Cleats should normally be dimensioned to the connection side in steel shop drawings.

     

    Screenshot explaining connection side on dimension line.
    Screenshot explaining connection side on dimension line.
  • The Dangers of Mirroring In Tekla (Tekla Tips)

    As a general rule:

    Avoiding Mirroring objects in Tekla  — if the handles will be inverted that is.

    Why’s that?

    • Everything is reversed.
    • All the handles are flipped. Down is up and up is down. Front is back and vice versa. It is thoroughly confusing and a bit of a nightmare. More over, Tekla doesn’t recognise an object which has been mirrored like this as the same as one which has not been mirrored. And essentially it’s gonna cause problems when you begin drafting the drawings. The model might look good, but unless drawings are not required, as a general rule, I would say avoid mirroring objects in Tekla. You can get away with it – but take due care.

     

     

  • What is a lifter? What is a tail bar? Why are they required in precast panels? (Precast – Lifter Series: Part I)

    Precast panels are heavy.

    Panel Mass
    Showing the title block of a shop drawing – shows the panel Mass.

    Cranes are used to lift the panels into place into their appropriate place. Because the mass involved is significant, it is very important that all the components of the lifting system are properly engineered and designed. If this is not the case then the panel could fall – and that can be lethal.

    In those post we will be focusing on lifters.

    This is how we denote a lifter:

    Lifter symbol
    This is how we denote a lifter in shop drawings. The 7T lifter block.

    This is how a lifter anchor looks like in real life.

    Real Life Lifter
    Showing a lifter and all its composite elements: Reo, Tail bar, void, and mesh.

    Let us explain everything in detail – the purpose and what it does.

    1. The Void

    Precast panels are made in moulds. Items are placed in the mould and wet concrete is poured into it. The concrete is like water. You can’t have anything projecting out of the mould – everything must be contained within the mould itself. In other words, you need to provide a hook or latch onto the panel if you want to lift it. And the hook cannot project out of the panel because then it would be very hard to cast such a panel.

    Impractical panel design
    Shows a hypothetical panel with a protruding lifter. It would be difficult to fabricate this panel with the lifter within a mould, not to mention it being inconvenient.

    Imagine if someone fabricated the above panel – you will notice that the lifter is sticking out of the panel. This would be very hard to fabricate. Because it would require a hole to be exposed within the wet concrete for the lifter to protrude out from. Consequently, lifters are placed within the panel outline. And in order to facilitate the ability of a lifting system to latch onto the panel, a small depression and hook is provided within the panel. In reality, the panel will look something more like this:

    A better representation of how a panel actually looks like
    This sketch more accurately represents how a panel is actually fabricated. You will notice a slight depression/void where the lifter is. A hook is located within that depression which is used to haul the panel up.

    You will notice that the actual concrete panel follows the white outline above, and that there is a depression in the panel. In addition – and this is not shown in the above diagram, there is a loop like feature on the end of the lifter which allows one to use it to haul the entire panel up into the sky etc. e.g. notice the hole at the top of the lifter shown below. It is this hole that is used to affix the lifter/panel to suspension systems.

    Lifter Up close
    This shows you how a lifter actually looks like. There is a little bit involved in these things.
    1. The Tail bar and reo – it’s importance in the safety/stability of the lifting system

    The second thing to note in the above diagram is the tail bar and reo. Why is this important? It’s important if you want to be able to safely lift the panel. If you forget to add the tail bar and reo, and simply add a lifter without those items – then when you attempt to lift the panel, the concrete will simply break off where the lifter is and the panel will fall to the ground – potentially killing people under the panel as it is being hauled up.

    The tail bar and reo provide very important friction which ensures that the panel is safely secured to the lifter when it is in the concrete. Without it, the weight of the panel will simply cause it to separate from the lifter as it is being hauled up.

    Generally Tek1’s practice is to draw the lifter only. It is assumed to be standard factory knowledge that the tail bar should be added when the panel is cast. We make assumptions that the guys on the factory know what they are doing.

    1. Mesh

    The mesh is what gives the concrete some additional strength. It’s important.

    In tomorrow’s post we will more closely investigate the lifter and certain matters pertaining to lifting.