Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tekla Connection Object #3658

Open
5 tasks done
DharmanGersch opened this issue Nov 25, 2024 · 1 comment
Open
5 tasks done

Add Tekla Connection Object #3658

DharmanGersch opened this issue Nov 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@DharmanGersch
Copy link

Prerequisites

What package are you referring to?

Backend (objects kit)

Objects.BuiltElements.TeklaStructures does not contain a definition for the Connection class although it is supported by the Tekla API, and there is an analog in Objects.BuiltElements.Revit.StructuralConnectionHandler

Is your feature request related to a problem? Please describe.

Connection objects are ignored by speckle because the connection object type is missing.

Describe the solution you'd like

Add a TeklaConnection type to the objects kit

Describe alternatives you've considered

Using plates instead

Additional context

The specific problem I'm trying to solve is taking a Revit model of lots of beams with connections types assigned as text properties, and inserting the appropriate custom Tekla connection object into a speckle model, so that it can be received in Tekla via the speckle Tekla connector.
I'm not interested in the connection coming from another piece of software, although it would make sense for compatibility with Revit connections where possible. In my case there will not be existing connection types in the input model. The types will be defined manually in Tekla according to the required types, and my code will create the connection objects as Tekla objects (as opposed to creating them downstream in Tekla

image

Related issues or community discussions

Tekla provide example code in their API reference for creating a connection between two beams

using Tekla.Structures.Model;
using Tekla.Structures.Geometry3d;
using Tekla.Structures;
using System;

public class Example
{
       public void Example1()
       {
           Beam B1 = new Beam(new Point(15000,0,-500), new Point(15000,0,6000));
           B1.Profile.ProfileString = "HEA400";
           B1.Material.MaterialString = "S235JR";

           Beam B2 = new Beam(new Point(15000,0,0), new Point(18000,0,0));
           B2.Profile.ProfileString = "HEA400";
           B2.Material.MaterialString = "S235JR";

           B1.Insert();
           B2.Insert();

           Connection C = new Connection();
           C.Name = "Test End Plate";
           C.Number = 144;
           C.LoadAttributesFromFile("standard");
           C.UpVector = new Vector(0,0,1000);
           C.PositionType = PositionTypeEnum.COLLISION_PLANE;

           // Use this value to have the same orientation as defined in the attribute file 
           C.AutoDirectionType = AutoDirectionTypeEnum.AUTODIR_FROM_ATTRIBUTE_FILE;

           C.SetPrimaryObject(B1);
           C.SetSecondaryObject(B2);

           C.SetAttribute("e2", 10.0);
           C.SetAttribute("e1", 10.0);

           if(!C.Insert())
           {
               Console.WriteLine("Connection Insert failed");
           }
           else
           {
               Console.WriteLine(C.Identifier.ID);

               Double DValue = 0.0;
               if(!C.GetAttribute("e2", ref DValue) || DValue != 10)
                   Console.WriteLine("Connection GetAttribute failed");
           }
       }
}
@DharmanGersch DharmanGersch added the enhancement New feature or request label Nov 25, 2024
Copy link

linear bot commented Nov 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant