Grasshopper-Tekla Live Link FAQ

Last updated May 10, 2021 by Tekla Extensions - General Design tekla.extensions-generaldesign@trimble.com

Software version: 
Not version-specific
Environment: 
Not environment-specific

Grasshopper-Tekla Live Link FAQ

The Grasshopper-Tekla link setup and documentation can be found here.

Questions


 

Q: What version of Rhino should I use?

A: The GH-Tekla link works with both Rhino 6 and Rhino 7. If upgrading, you don’t need to re-install the link.

 

Q: Why doesn't the Tekla tab or components show up in Grasshopper?

A: If the Tekla tab doesn’t show up, the link file might be blocked as it’s downloaded from the internet. To unblock the file,

  1. In Grasshopper, click File > Special Folders > Components Folder
  2. Right-click GrasshopperTeklaLink.gha and click Properties
  3. Under the General tab, click on the Unblock button, and click OK. (If you don’t see an Unblock button, the file is not blocked.)
  4. Restart Rhino/Grasshopper. The Tekla tab should now be visible in Grasshopper.

 

Q: Why doesn't the link create anything in Tekla Structures?

A: If the components fail to create anything in the Tekla Structures view, here are some things to check:

  • First check if there are any generated objects listed at the output of the Tekla components in Grasshopper.
    • If there are objects listed in Grasshopper, make sure to set the work areacertain portion of the model that is currently active for working on in a view

      Tekla Structures indicates the work area using dashed lines. Since objects outside the work area exist but are not visible the user can set a certain sized work area so that the views of the model are simpler and quickly updated, for example.

      in Tekla Structures to the entire model (right-click the Tekla view -> Set work area to entire model) and adjust the view depththickness of a slice of the model defined starting from, and perpendicular to, the view plane

      so it's large enough to include any generated geometry (right-click the view -> Properties... -> Increase the view depth both up and down by adding a few 0:s).
    • If still nothing shows up, check that the profiles and grades you're using for the Tekla components exist in your environment and change them if not. If you haven't set the profile etc yourself the default values apply, but these might also be missing from your environment (in that case you might want to change them from the Gasshopper menu: Tekla > Default Attributes...).
  • If there aren't any objects at the output of the Tekla components, and/or the components are red:
    • Make sure you launch Tekla Structures and open a model first, and then launch Rhino and Grasshopper. Otherwise the API link can't be established.
    • Make sure you have installed a version of the link that matches the Tekla Structures version your're using. If needed you can re-inistall the link as per the instructions on the help page (https://teklastructures.support.tekla.com/not-version-specific/en/ext_gr...).
    • Make sure you're not using the Viewer or Planner configuration of Tekla Structures, or the Carbon license, as you can't create objects with these.

 

Q: Why do I get the message "System.MethodAccessException: Current Tekla Structures module configuration does not allow this operation" when inserting a Tekla GH-component?


A: This happens if you use the Viewer or Planner configuration of Tekla Structures, or the Carbon license. The link requires a modelling license. Also make sure you pick a modelling configuration on startup.
 

Q: Can I shut down Rhino/Grasshopper and Tekla and continue where I left off?

A: Yes, the inserted grasshopper components will reconnect with the objects in the Tekla model. Just make sure you open the model first and then launch Grasshopper.

  • The object mapping information is stored in the Grasshopper subfolder of the Tekla model folderfolder that is used for storing files associated with a model

    Tekla Structures stores all files associated with a model in a folder it creates with the same name as the model database (.db1).

    In multi-user mode all users access the same model folder.

    .

 

Q: Can I view the model without Grasshopper?

A: Yes, you can open the Tekla model without launching Grasshopper or even having it installed and the geometry is still there. If you can't see anything, try fittingadjustment of a part end

the view area to the whole model and adjust the view depth both up and down from the view properties.

  • Note that any modifications you make to the generated objects might be reset the next time you run the Grasshopper definition (to avoid this, you can Bake the objects to Tekla from the Grasshopper components).

 

Q: How can I make a copy of the Grasshopper file so that the copy creates new objects instead of updating the existing ones?

A: To duplicate a GH definition so that new objects are generated, you'd need to copy the GH components into a new GH definition (rather than copying the file itself). This gives the GH components new GUIDs and they will create new objects in Tekla. It's quickly done using keyboard shortcuts:

  1. Ctrl+A select all
  2. Ctrl+C copy all
  3. Ctrl+N new GH file
  4. Ctrl+V paste all
  5. Ctrl+S save the new file

The new file will now generate and refer to new Tekla objects.
 

Q: How can I update the link to another Tekla version?

A: To update the link or switch to target another Tekla version, you need to replace the link .gha file.

  1. In Grasshopper, click File > Special Folders > Components Folder
  2. Close Grasshopper and Rhino, and replace GrasshopperTeklaLink.gha in the Components Folder with the new version .gha file
  3. Launch Grasshopper again
    • If the Tekla tab doesn't show up, you need to unblock it as described in the previous section.
  4. If the new link version targets another Tekla Structures version, the Grasshopper components (including any already inserted ones) will now interact with the new Tekla version instead.

 

Q: Can I work in Imperial units?

A: Yes. For geometry, the Tekla components will use the units of the currently open Rhino document, and translate that to the units of the currently open Tekla model.

  • The scale is read whenever a Rhino document is created or opened (so you'd need to re-open the document if changing the scale from the document settings).
  • Certain attribute inputs like parametric profilepredefined profile whose cross section dimensions the user can change by using parametric variables

    sections might need to be in mm even if the Tekla and Rhino models are using something else like feet and inches. Scale accordingly.
  • If the Rhino document is changed, points picked in Tekla will use the new scale. However referenced or internalized Rhino/Grasshopper point and geometry values won't adapt. Keep this in mind if reusing a script from a different system.
    • E.g the example definitions are created using metric (mm) units, so this means the slider values etc might need to be adjusted if viewed with imperial units.

 

Q: Why do I suddenly get duplicated objects in my Tekla model? 

A: Here is a list of things that might cause the mapping to break between GH and Tekla, resulting in changing guids or duplicated objects:

  • Undoing in Tekla rather than Grasshopper (e.g. pressing Ctrl+Z with the Tekla window active, this could easily happen subconsciously)
    • Objects that have been removed by GH might be brought back by Tekla and have no connection to the GH script any more.
  • Copying a Tekla component within Grasshopper
    • This creates new objects in Tekla in the same location as the old ones (as it should). The new objects will be left behind if you delete the new component in GH (whether you delete the component manually or by undoing the copying).
  • Cutting and pasting a Tekla component within Grasshopper
    • Will create duplicated objects, since when you paste the component GH actually inserts a new component with a new instance GUID (so no connection to the old component can be derived).
  • Not saving the GH script before closing
    • Objects that were created by new GH components that weren't saved with the script will remain in the Tekla model.
  • Not saving the Tekla model before closing
    • Tekla objects that have been removed by GH will be re-loaded into the Tekla model when reopening, and don't belong to a GH component any more.
  • Losing the API connection - can happen e.g. if Tekla or Rhino/GH is being unresponsive for too long during a solution (or more rarely under a number of unpredictable circumstances).
    • This usually means the mapping can't be updated between GH and Tekla, so continuing to work with the GH script might break the mapping.
    • There should appear warnings on the GH components if this seems to happen, in which case you'd need to restart Rhino before continuing.
    • This is tricky to replicate, so the warnings might not always be triggered. Let us know if you find a way to replicate situations where the mapping breaks!

Of course, having daily backups of both the script and the Tekla model (including the Grasshopper subfolder) helps if things go really south.
 

Q: Can I put my Tekla components inside a cluster?

A: Generally no. Keep any components that create objects in the Tekla model outside of clusters. Otherwise the model might stop updating or the wrong objects get updated. Other Tekla components like Attributes are usually fine to put in clusters though.

  • Clusters are kind of special, Grasshopper treats them as separate definitions from the main definition. So anything coded for the main definition won't reach into clusters (like baking). There are other hiccups to be expected as well, e.g. if you make a copy of the cluster, both clusters will refer to the same Tekla objects. This is true even if you untangle the clusters (which is just like making a copy of a normal GH definition). For these reasons you shouldn’t have object-generating Tekla components inside of clusters.

 

Q: Why do the Tekla components handle matching of tree inputs differently from how standard Grasshopper components do the matching?

A: Most Tekla components read in every input at once to be able to perform batch operations when reading/writing guids to file, updating the Tekla model etc. Otherwise execution would be much slower. As a side effect the components can't take advantage of Grasshopper's default mapping behavior and instead often resort to flattening every input (and then rebuild the tree structure for the output).
 
The workaround when the behaviour seem inconsistent is to craft the input lists/trees to have an equal number of entries, so that they can all be paired off correctly. You can match the length of your inputs (number of input elements in each tree) by duplicating the inputs you need in the smaller trees using the Duplicate Data component, measuring the reference list lengths with the List Length component. The Trim Tree component might in some cases be used on the longer tree depending on what level you'd like to match, and sometimes you need to be a bit clever with graftings and flattenings.

For cetain components like Rebar Groupgroup of reinforcing bars that are side by side and have identical properties, except the possible variation in bar lengths

and Component the input matching can be particularly tricky, since these components need to support one-to-one, many-to-one and many-to-many relationships, and each group or component can have multiple input shapes or secondaries. See the question about inserting multiple connections later in this FAQ.
 

Q: Why doesn't the output structure of my Tekla component seem to match the input tree structure?

A: If there are empty branches or null objects in the input, some branches may be missing from the output structure.

  • If the output structure seems wrong or flattened for some other reason, you can use the Unflatten Tree component on the output with the input tree as the guide.

 

Q: How can I read properties or UDA:s from an existing Tekla part?

A: To extract information from existing Tekla objects, reference them into the Grasshopper definition. Then:

  • For report properties, use the Get Property component.
  • For UDAobject property created by the user in order to widen the range of predefined object properties

    User-defined attributes are used when the predefined object properties are not sufficient but more properties are needed. For example, comment, locked, and erection status are user-defined attributes.

    :s, use the Get UDA value or Get All UDAs component.
  • For other attributes like profile, classpart property that groups parts according to identifiers given by the user

    The identifiers of classes are usually numbers. Classes can be used for defining the color of parts in the model, for example. Class does not influence the numbering of model objects.

    , position, numberingprocess of assigning position numbers to parts, cast units, assemblies, or reinforcement

    In Tekla Structures, the position numbers assigned in the numbering are shown in marks and templates, for example.

    etc as well as the geometry use the Deconstruct and Expand components.
  • For extracting solid geometry use the components Convert to Brep or Convert to Meshreinforcement that represents a mesh of steel bars in two perpendicular directions

    In Tekla Structures, the reinforcement mesh bars in one direction are called main bars and reinforcement mesh bars perpendicular to them are called crossing bars.

    (faster).

 

Q: Why can't I set UDA:s for my parts with the Attributes or Set UDAs component? The component goes red or the value simply doesn't show up in Tekla where I expect.

A: Several things to look out for:

  • Make sure you're using the right syntax to set the attributes. There's an example in the help and in the UDA input tooltip. If the component is red there might be some useful error information in the balloon tooltip.
  • The UDA names are case-sensitive, so there's a difference between "Comment" and "comment"
  • Make sure the UDA value you're setting has the type (string/double/int) that Tekla expects. In general, any UDA can be set as either a string, a double or an int and Tekla won't complain. However the dialogs and reports in Tekla that use the UDA will expect it to be one specific type so you need to use the correct one. See the syntax in the help or in the UDA input tooltip on how the UDA type can be specified when constructing the UDA input.
  • Make sure you're using the right name for the UDA. Note that the name is generally _not_ the label that you see in the User-defined attributes dialog. Instead, you need to find out the actual name of the UDA that's backing the field.
    • To get the name of the UDA, use the Get All UDAs component
    1. Insert an object manually into Tekla Structures
    2. In the User-defined attributes dialog, fill in a value in the UDA field you're interested in 
    3. Reference the object into Grasshopper and use the Get All UDAs component to read the UDA name
    • Alternatively, save a preset and check the UDA names from there.
  1. In the User-defined attributes dialog, fill in a value in the field you're interested in 
  2. Save the part attributes as a preset
  3. Open the preset file (located in [modelfolder]/attributes, the one that has the extension .more contains the UDA:s) in a text editor
  4. Locate your value
    -> The name before the value is your UDA name

     

 

Q: The edges of my plate or slab look all weird and jagged.

A: If the boundary you feed to the Plate(1) part that represents a flat structure

(1) In some contexts, for example in analysis, the term plate object may be used to refer to plates.

(2) plate that represents a steel structure

(2) Plate is mainly used as a connection piece or as a floor plate.

or Slabplate that represents a concrete structure

In Tekla Structures, a slab is created by picking three or more points.

Slab may be part of a floor, for example.

component is doing a lot of twists and turns, the default maximum of control points that gets added in Tekla (99) might not be enough.

  • In that case, right-click the component in Grasshopper and increase the point limit from the context menu. Keep in mind that more than 99 points quickly drains performance without producing a much better output if the boundaries are smooth and simple.

 

Q: Why do I get the message "Solution exception:Cannot construct an arc with three points in a line" when trying to create a lofted plate between two arcs?


A: This is a tolerance or rounding issue on the Tekla side, where Tekla (incorrectly) assumes the three points are co-linear when in reality they are part of an arc with really big radius. It’s been reported and awaits a fix.

  • Meanwhile one solution is to move the middle point of the arc one or a couple of millimeters, so that Tekla is able to create the arc and the lofted plateplate that is created by using construction objects

    Lofted plates can be used to model plates with complex shape, for example, rolled plates and plates with double-curved form.

    .
  • If your lofted plates are large, the required movement can be quite substantial. In this case an alternative solution could be to convert the arc to a polyline (Curve To Polyline) prior to feeding it into the Lofted Plate component.

 

Q: How can I control the orientation of my rebar hooks?

A: If your rebars are straight, Tekla doesn't always know which way the hooks are supposted to point. In that case you can add a middle point onto your rebar centerlines or shapes in Grasshopper and move it sideways a mm or so. This results in a triangle (start point - middle - end point) that fixes the plane of the rebar and thus the orientation of the hooks. As long as the deviation in the middle is small and within the tolerance, Tekla will still consider these bars as straight.
 

Q: How can I create a steel assembly that’s “flat”, i.e. the parts are added directly rather than as sub-assemblies?

A: Use the Cast Unit component instead of the Assembly component, with the steel parts as input.
 

Q: Why do I get the message "Solution exception:Could not load type 'Tekla.Structures.Geometry3d.FacetedBrepWithNormals [...]" when trying to create an Item?

A: The message means that you don't have the correct Service Packs for Tekla Structures installed and therefore can't create Items with the link. The link for Tekla Structures 2017 requires 2017 SP5 or newer, the link for Tekla Structures 2017i requires 2017i SP1 or newer. You need to upgrade Tekla Structures with a supported Service Pack, then it will work correctly.
 

Q: Why can't I create (solid) items from my Grasshopper/Rhino breps? The items are showing up as either non-solid or not at all.

A: To create solid items, the Rhino/Grasshopper breps need to be convertible to valid/good closed meshes. 

When transferring a brep to Tekla, the brep is automatically meshed by the Rhino API using standard coarse settings. Note that the structure of the mesh will depend on how the brep has been created. Even if the brep looks good in Rhino/Grasshopper, the resulting mesh can be invalid (e.g. it can contain non-manifold geometry, missing faces or duplicated points). This will prevent Tekla form using the mesh to create a valid and/or closed item. To identify issues you can try to mesh the brep yourself as in point 3 below.

Suggestions:

  1. If creating the breps by lofting or sweeping
    • Make sure your section/rail curves don't contain double points (the Simplify Curve component can be used to resolve this).
    • Note that the section curves usually need to be completely planar if you want to cap the brep (check with the IsPlanar component).
  2. Make sure the brep or resulting mesh isn't self-intersecting.
    • E.g. tight bends can cause this.
  3. Do the conversion to a mesh yourself in Rhino (Mesh command) or Grasshopper (Mesh Brep component) and use that as the geometry input for the Item component.
    • Try different settings for e.g. Minimum edge length (as edges shorter than 1-2 mm are difficult for Tekla to handle).
    • Check the resulting mesh with the Check command in Rhino to find any anomalies.
      • The MeshRepair command can solve some of the found issues.
      • The ShowEdges command can help you find and visualize naked edges (indicating problem areas).
      • The AlignMeshVertices command can help you get rid of small and problematic faces.
      • In general you should keep working on the mesh until the Check command shows that this is a good mesh.
    • ​In some cases the check can return "This is a good mesh" but the mesh still can't be used to create an item in Tekla.
      • If there are additional warnings/"Important things to consider" like intersecting faces that prevents solid creation, try to get rid of those. You might need to recreate the Mesh with different settings.
      • Another reason for failure can be very small/thin triangles. Try using the AlignMeshVertices command with different DistanceToAdjust parameters before transferring the mesh. After this you might need to run the MeshRepair command again.

 

Q: Why do my generated items seem triangulated in the model and in drawings (and not smooth as in Rhino)?

A: Tekla doesn't handle breps as NURBs, and so breps are automatically converted to triangulated polymeshes before being imported to Tekla as items. Any internal lines are hidden in Tekla by default, but the imported surfaces still consist of triangles and polygons that may show up.

  • To get a finer meshing, you can right-click the Item component and select the "Smooth" meshing option.
  • For full control, you can mesh the breps yourself in Rhnio (Mesh command) or Grasshopper (Mesh Brep component)and feed the resulting mesh to the Item component for transfer to Tekla. This way you can get the item as smooth or coarse as you desire.

 

Q: How can I assign custom shape names to the items I create through Grasshopper?

A: The GH-Tekla link assigns a random shape name (based on a unique GUID) to any shape it creates when inserting an item using the Item component. The shape name needs to be unique to avoid conflicts, therefore as a safeguard there's no way to override the automatic naming directly using only the Item component.

However it can be done using the Create Shape component like this:

 

Side note: This is also a much more efficient way of inserting items in case they all have the same shape

  • Only one shape gets created and added to the Tekla Structures database
  • Item copies are then created by feeding a list of points/lines to the Line input of the Item component).

 

Q: Why can't I insert my connection/detail/plugin with the Component component?

A: Some possibilities:

  • Most likely you're not having the correct input sequence. Especially plugins can require non-intuitive inputs using the Component Input component. In these cases the input sequence might be tricky to find out since the required input order in Grasshopper/Tekla API might be different from the input order you would use when inserting the component manually in Tekla. There can be a subtle differences as well, for example an input of two points might need to be given as either a list of two points or as two single points in separate inputs. See the question below on how to find out the correct input sequence.
    • Note that custom parts always require two input points in the API (see below)
  • There might already exist a (valid or invalid) connection at that location, either created by the current component or by another component.
    1. Select the Component component and check if anything is selected in the Tekla model. If so, delete it. Then re-trigger the Component component by double-clicking it.
    2. Filter out and delete any already inserted connections directly in the Tekla model. Then re-trigger the Component component by double-clicking it.

 

Q: Why can't I insert my custom part with the Component component?

A: A custom partcomponent for creating a part that cannot be created by using any existing part command or part profile

Typically, custom parts are used to create parts that have a complex composition. For example, castellated beams and sandwich panels are often created as custom parts.

requires you to provide two input points for the Component component in Grasshopper, even if the part is inserted using just one click in the Tekla UI. For these single-point custom parts the second point can usually be a point straight above the first point.
 

Q: How can I find out the correct input sequence for my connection/detail/plugin?

A: Insert the connection/detail/plugincomponent that is developed using Tekla Open API

Plugin is a .dll file and loaded inside Tekla Structures process.

Plugins can be started from the applications and components catalog.

manually into Tekla Structures, then reference it into Grasshopper and use the Deconstruct Component component. The input can be determined by examining the outputs named Input types and Inputs.

Here's an example using the Floor Layout component:

From this we can see that we should use 5 inputs for the Plugin Input component (turns out these inputs correspond to the origin, x-axis, y-axis, outline and optionally z-axis) when inerting this plugin from Grasshopper. Note that this input sequence is different from what we would pick when inserting the plugin manually through the Tekla UI. This is common for how certain plugins behave when inserting them through the API.
 

Q: How can I insert multiple connections/details/plugins? No matter what I try, I get too many or too few connections or they show up in the wrong places.

A: If you're trying to add many connections to many members simultaneously it can sometimes be tricky to set the input and attributes for the Component component in the right way. Because of the different ways you can connect members (one-to-one, many-to-one, many-to-many, and each case with one or multiple secondaries) it's not always even possible for the component alone to match up the inputs in the desired way, no matter how you try to flatten or graft the inputs.

The workaround is to craft the geometry inputs like main part(1) part that exists in a building object and that determines the position number for the assembly or cast unit and the direction of assembly or cast unit drawings

(1) Main part can be an assembly main part or a cast unit main part.

(2) input part that the user selects first when creating a component

(2) Connections and details always have a component main part.

and secondaries (and the attributes input if needed) to have an equal number of items or branches, so that they can be paired off correctly with each other. This means that each element in e.g. the Main part input list should have a corresponding element at the same position in all the other input lists (if the connection uses multiple secondaries or multiple points, the corresponding element would be a branch/group of objects).

You can match the length of your inputs (number of input elements) by duplicating the data in the input with the smaller set of data using the Duplicate Data component, measuring the longer list lengths with the List Length component. The Trim Tree component might in some cases be used on the larger input depending on what level you'd like to match, and sometimes you need to be a bit clever with graftings and flattenings. Finally the Cross Reference component can be used to create pairs from two lists of input that should all be connected together (i.e. for something similar to a mesh of beams).

Here's an example with some different connection scenarios and how you might set up the input for them:

https://drive.google.com/file/d/15KBYP-mzcyxCZGjp7RWvXhPu6iMlDx-Z/view?u...

Note that this example was made with the Default environment. If you open it with something else the profiles and connections might not exist in the environment, in which case you need to swap them out for something else that's appropriate.


 

Q: How can I find the correct attribute names to use with a Tekla connection/detail/plugin?

A: Similar to UDA:s, note that the attribute name is generally _not_ the label that you see in the connection/detail/plugin dialog. Instead, you need to find out the actual name of the attribute that's backing the field.

The easiest way to find out the attribute name is use the Deconstruct Component component in Grasshopper.

  1. Insert the plugin/connection/detail manually into Tekla Structures
  2. In the plugin dialog, fill in a value in the field you're interested in and modify the component
  3. Reference the plugin into Grasshopper
  4. Use the Deconstruct Component component to view the attribute names
  5. Locate your value
    -> The name before the value is your attribute name

Or save a preset for the Tekla plugin/connection/detail and check the atribute names from there

  1. Insert the plugin/connection/detail manually into Tekla Structures
  2. In the plugin dialog, fill in a value in the field you're interested in 
  3. Save the plugin attributes as a preset
  4. Open the preset file (located in [modelfolder]/attributes) in a text editor
  5. Locate your value
    -> The name before the value is your attribute name.

A third alternative is to use the extension Component Variable Importer in Tekla Structures to find your field value and the associated attribute:

  1. Insert the plugin/connection/detail manually into the Tekla Structures model
  2. In the plugin dialog, fill in a value in the field you're interested in and modify the component
  3. Launch the Component Variable Importer extension 
  4. Select the component/plugin in the model
  5. Find your value i the table
    -> Next to the value is the associated attribute name. Note the attribute type as well so you can use the correct syntax.

 

Q: How can I control the up-direction and type of a detail?

A: Use the attributes zsuunta (values 0-6) and detail_type (values 0-2 for end/intermediate/reversed) and feed them into the Attributes input of the Component component (using the appropriate syntax). These attributes are backing the fields Up-direction and Detail type on the General tab in the component/detail dialog.

  • This is sometimes needed since default "auto" up directionconnection or detail property that indicates how the created connection is rotated around the component secondary part, or the created detail around the component main part, relative to the current work plane

    The up direction options are +x, -x, +y, -y, +z, -z, and auto.

    and detail type don't always work as intended when inserting components through the API.
  • The attributes zang1 and zang2 set the angles in case you need them.

 

Q: Can I insert rebar sets through the link?

A: Rebar sets are currently not supported.
 

Q: Can I insert bolts and welds through the link?

A: There are no dedicated components for bolts or welds. As a workaround it´s possible to insert any component or plugin that generate these object types.

Q: Can I [...] drawings?

A: Probably not, drawings are unfortunately not within in the scope of this link.
 

Q: How can I create my own C# scripting components?

A: Using C# Script components in Grasshopper can make many calculations and operations more straightforward. Referencing the Tekla Open API into the scripting components allows you to create things in Tekla Structures and manipulate the model in ways that perhaps aren’t supported by the current GH-Tekla link. Some examples below. Here are the initial steps:

  1. Add a C# Script component
  2. Add references to the Tekla Open API 
    • Right-click the component icon/text -> Manage Assemblies...,
    • Add Tekla.Structures.dll and Tekla.Structures.Model.dll from \nt\bin\plugins\ in your Tekla Structures install folder.
  3. Add, rename or remove inputs for the component
    • To change if the input is handeled as a single object or lists, right click the input and choose the Access type.
    • To change the expected input object typedescription of a group of objects that share common characteristics

      The objects are grouped based on different characteristics in models and in drawings. Examples of model object types are beams and rebar sets. Examples of drawing object types are parts and marks.

      , right-click the input and set the Type hint.
  4. Double-click the scripting component icon/text to start coding.

If you’re really into it, scripts like these can be made into proper GH components using Visual Studio. In that case it’s convenient to start with these Grasshopper template files: https://marketplace.visualstudio.com/items?itemName=McNeel.GrasshopperAs...

For Rhino 7, update the references accordingly.

The Tekla Open APIapplication programming interface that lets third-party applications integrate to and communicate with Tekla Structures

Tekla Open API enables, for example, customizing Tekla Structures.

is well documented with code examples here: https://developer.tekla.com/tekla-structures/documentation/

And check out the very active Tekla API forum, both for looking up old questions and asking new ones: https://forum.tekla.com/index.php?/forum/269-api-general-discussions/
 

C# Example 1: Create beams in Tekla

Here’s an example that creates and updates beams in Tekla Structures using a C# Script component in Grasshopper. This is similar to how the existing Beam components work.

Creating new Tekla objects though the Tekla API is rather straigh-forward. The biggest challenge initially is setting up the GUID tracking so that you can update already inserted objects, rather than keep inserting new objects into the model every time the solution runs. This example point to a way of handling that as well.

https://drive.google.com/file/d/1ntkVvQKQJmbBpdGxN7jvFjc7yMLGwBw7/view?u...


 

C# Example 2: Add gridlines to a grid

The Gridmodeling aid that represents a three-dimensional complex of intersecting grid planes or intersecting grid planes and curved grid surfaces

The grid is defined by coordinates in 3D space. It is shown two-dimensionally on the view plane by dash-and-dot lines. A grid can be rectangular or radial.

It is possible to have more than one grid in a model. For example, a large-scale grid for the entire structure, and smaller grids for some detailed sections.

It is also possible to show grids and grid line labels in drawings, and to modify how they are shown in the drawings.

component only creates orthogonalview projection that displays objects in right-angles projection

In orthogonal model view the size of the objects is the same despite of their distance to the viewing point and the zoom remains on part faces.

grids. To do something else you'd need the Open API. Here's an example that inserts gridlines to an existing grid:

https://drive.google.com/file/d/1BzxLum6o9AIKJ61tk0i0YkH8ZhDULTNv/view?u...


 

C# Example 3: Proper chamfers for Tekla plates

This is a C# Script component that turns arcs in plates or slab boundaries into rounded or arc-point chamfers in Tekla (rather than faceted edges as is the default).

It works with general curves/boundaries as well (not just with arcs) by approximating the boundary with arcs, but that's a bit unstable.

This scripting component can be used to create rounded voids in a similar fashion, if you use it on the cutting plate/slab (like in the last example in the definition).

https://drive.google.com/file/d/1nDZ3uuGHXg41dwfZLtgzYJKznflQCYgP/view?u...

 

C# Example 4: Human UI

Human UI is a way to provide a traditional windows user interface for a Grasshopper definition, which means the end user doesn’t need to fiddle around with the script components to set the parameters.
Human UI requires the Human UI plugin to work.

Below is an example of using Human UI with a GH-Tekla definition.

The example also shows how you can add a button in Human UI that asks the user to pick objects in Tekla Structures or open the profile catalogcatalog that displays profiles and information on the profiles

In addition to the available profiles in the respective Tekla Structures environment, the user can add fixed or parametric user-defined profiles to the profile catalog. It is also possible to import profiles to the profile catalog.

. This behavior isn’t supported out of the box, but can be achieved with the provided C# Script component which can trigger any command from the context menu of any component or param (i.e. not just Tekla components). Just give the command name as input (It's sufficient to just use the beginning of the command name if it's unique).

https://drive.google.com/file/d/1_aIrUNoJzynPTGRhrbgtELWGyHU1HHKG/view?u...


 

Q: I didn't find an answer in this FAQ - what's next?

A: For pure Rhino and Grasshopper related questions, the respective product forums are a good place to start - lots of questions already have answers and users are eager to help each other out. Try a web search first for your question. The McNeel helpdesk and your local Rhino reseller are also happy to anwser questions - they are the experts.

For Grasshopper-Tekla link related questions head over to the Tekla Extensions discussion forum and post your question there, or contact your local Tekla helpdesk. The Grasshopper-Tekla link documentation can also be useful.

 

Quick feedback

The feedback you give here is not visible to other users. We use your comments to improve our content.
We use this to prevent automated spam submissions.
Content rating: 
Average page rating: 5 (2 votes)
Refresh page after voting to show updated result.