Grasshopper Component

Download the component from Tekla Warehouse.
Are you looking for the Grasshopper-Tekla Live Link?
Back to topAbout
Run your favorite Grasshopper definition as a traditional Tekla component, without needing to be exposed to the spaghetti powering it all! Or develop your own Tekla custom components using visual scripting.
The Grasshopper Component in Tekla Structures can trigger any Grasshopper definition to generate objects in Tekla, but it looks and behaves like a traditional Tekla component. Select a Grasshopper definition in the component dialog, and the component will ask you to pick required inputs in Tekla. The component dialog is automatically populated with properties that are extracted from the parameters in the definition. The Grasshopper sliders are brought over to Tekla as well, enabling true parametric modeling flexibility.
Back to topDemo videos
Using the Grasshopper Component
Creating a new Grasshopper Component type
Resources & examples
Grasshopper Component plugin for Tekla Structures tsep installer:
Grasshopper Component on Tekla Warehouse
Some definition examples that work well as a component, created with the Default environment:
Grasshopper Component - Definition Examples
Here's a Grasshopper definition example showing the different elements that can be used to design the dialog and behavior of the Grasshopper component:
Grasshopper Component Template
Back to topPrerequisites
The component requires these tools installed on the same machine:
- Rhino 7 or newer (not WIP)
- Tekla Structures 2019i or newer
- the latest Grasshopper-Tekla Live Link
- The Grasshopper Component itself
Note that a Rhino license will be reserved whenever a component is inserted or modified, not just when creating a new component type in Grasshopper. To release the Rhino license after using the components, Tekla Structures must be closed.
Back to topInstalling the component
- Make sure you have Rhino 7 or 8 and the latest Grasshopper-Tekla link version installed.
- Install the Grasshopper Component plugin from the tsep and restart Tekla Structures.
Once the component is installed, it will show up in the Component Catalog in Tekla Structures.
Image
Using the component
Note: you don't need to have Rhino/Grasshopper running, it will be launched when needed.
- Double-click the Grasshopper component icon in the Component Catalog to open the component dialog.
In the component dialog, select the Rhino version to use from the version dropdown (set to 8 in the below pic). This setting will be remembered in the next session.
Image- Set the path to the Grasshopper definition you'd like to use.
- Once the Grasshopper definition path is set, Rhino.Inside.Tekla will be loaded (which takes a couple of seconds the first time it's done during a Tekla session - note that this will also reserve a Rhino license for the rest of the Tekla session).
- The component dialog will be populated with the properties that are found in the Grasshopper definition parameters, and the component is ready to be inserted.
- Click the component icon again to insert it (like you would with any other component). The message bar in Tekla will tell you what to pick, based on the model input parameters found in the definition.
- The definition will run in the background and generate objects in Tekla Structures.
The units used when the component solves the definition will be taken from the units of the Tekla Structures model. This can be changed, see "Setting Tolerances and Units".
Back to topComponent dialog interface
The dialog includes standard component dialog controls like Save, Load, Modify, OK and so on.
Topmost in the dialog there’s a field to enter the path to the Grasshopper definition, along with buttons to select a definition from the file system, reload the definition and edit the definition in Grasshopper. The definition path can be made relative to the current model folder by starting the path with ".\" (dot and a back-slash). If a definition is picked from the current model folder using the file dialog, the model folder part is automatically replaced. "..\" refers to the level above the current model folder and can also be used.

Properties extracted from the definition will be shown in the dialog as normal component properties, i.e. with a text box or drop-down for changing the values and a check box for filtering. Number Sliders from the definition will get a slider in the component dialog as well, next to the numerical value.
When a slider, dropdown or button is used to set a property in the dialog, the new value is applied immediately on any selected component instance in the Tekla model. This behavior can be disabled by turning off the Auto Modify switch in the top right corner.
If you edit a value in a property text box directly (e.g. without using the slider), the new value won't be applied immediately. This way you can modify several values without needing to wait for the selected component to update. You can press Enter to apply the values to the selected component.
For inserting line breaks in a property field containing text, \n can be used.
Properties can be grouped into tabs and groups by modifying the definition in Grasshopper. See Grouping properties and changing their visibility below.
You can save presets in the component dialog, like for any component. The preset includes which Grasshopper definition is being used.
Back to topCreating a new component type
Any Grasshopper definition used in the component can be regarded as a separate component type.
To create a new component type from scratch,
- Open an empty Grasshopper definition in a standalone Rhino/Grasshopper instance.
- Craft the Grasshopper script as you normally would, with Tekla components creating objects in Tekla.
- Save the definition.
- Point the Grasshopper Component dialog in Tekla Structures to the new definition. Parameters are loaded into the dialog and the component can be inserted.
To edit the component, you can modify the definition in Grasshopper, save it and then re-load it from the component dialog. See "Editing a definition" later in this document.
The following sections of this document outline what parameters and inputs are transferred from Grasshopper to the Tekla structures dialog and how you can customize the dialog.
Back to topSetting up model inputs for the component
Model inputs (i.e. what the user is asked to pick) will depend on the selected Grasshopper definition and will be extracted from the following floating params within the definition:
- Tekla Point, Tekla Line, Tekla Polyline and Tekla Face params
- Model Object params (Beam, Plate param etc)
- Construction Object params

For the params to be used as input, they should be enabled, not have any input wires, and be connected to something downstreams.
So if you have e.g. a Beam param in the definition, on insertion the component will ask the user to pick a Beam in Tekla structures. A Tekla Point, Line or Polyline param will make the component request a point, line or polyline as input. Construction object params will request a construction object.
To change the prompt that will be visible when inserting the component in Tekla, rename the param in Grasshopper (by right-clicking the param and change the name in the context menu). So e.g. naming a Tekla Point param "the Start Point" will result in the prompt "Pick the Start Point".
The order the inputs are asked in will be the visual order of the parameters in Grasshopper, from top to bottom.
To make the component request multiple points or beams as input (note: this doesn't apply to lines, polylines or faces due to API limitations), the prefix "Multiple" (not case sensitive) can be added before the parameter name in the definition. The last part of the name can still be changed of course.

The short form "m:" can also be used as the prefix. If the short form is used, the prefix will not be part of the Tekla prompt when picking objects.
Note: The Grasshopper components are subject to the same API limitations as other Tekla plugins when it comes to the number of objects that can be picked. This means:
- There can be a maximum of 10 different model input params. These correspond to the 10 allowed input groups for any Tekla plugin. Each group holds a list of points or model objects.
- In total, over all these params or groups, a maximum of 99 points or model objects can be picked as input when inserting any single component.
- It’s not possible to make a component request multiple lines, polylines or faces as input by using the "Multiple" prefix, only multiple points or model objects. This is because these object types need to be represented as point lists internally, each list occupying one of the available input groups.
Adding properties to the component dialog
The properties that are shown in the component dialog will depend on which Grasshopper definition is selected, and will change if you select another definition.
The available properties are extracted from the following floating params and components in the Grasshopper definition:
- Panels
- Number sliders
- Value lists
- Boolean toggles and Buttons
- Text, Integer and Number params + params derived from these like the File Path param.
- Tekla Catalog components (e.g. Profile Catalog component)
These params will be exposed as properties in the component dialog in Tekla Structures, as long as they are enabled, don’t have any input wires and are connected to something downstreams. The property labels will be the names of the parameters/sliders/panels/lists in Grasshopper, and can thus be easily edited in the definition.

The order of the properties will be the visual order of the parameters in Grasshopper, from top to bottom.
Showing images and additional text in the dialog
To add additional text to the dialog, add a panel without a name to the definition. The text in the panel will be displayed in the dialog.
- The panel should NOT be connected to anything downstreams (then it would become an input parameter as normal).
The text can contain links to web pages or files that will become clickable in the Tekla dialog.
- Auto-detects web links starting with "www", e.g. www.google.com.
- Add "http[s]://" before the URL if it doesn't show up as a link, e.g. https://learn.microsoft.com.
- Files can be linked with the prefix "file:///", e.g. file:///C:\Temp\ReadMe.txt.
Images can be shown by adding an Image Sampler or Image Resource component to the definition. To scale down the width of the image, use the image sampler component and put the pixel value as the component name e.g. "300". For more image formatting options, see the Advanced section below.

Back to top
Grouping dialog elements and changing their visibility
By default, all floating Grasshopper params, panel texts and images listed in the above chapters are shown in the Tekla component dialog, except for params or components that are disabled, have an input wire, or aren't connected to anything downstreams.
You can organize properties and images into tabs and groups in the component dialog. This is done by sorting the parameters or images into groups in Grasshopper and using the prefix "Tab:"or "Group:"before the group name (not case sensitive). The short forms "t:" or "g:" can also be used as prefixes.

Groups with tab and group prefixes can be nested in Grasshopper to create tabs that contain groups in the component dialog. The same tab or group name can be used in multiple places in the Grasshopper definition; in that case the params inside the Grasshopper groups with the same name will be collected into a single tab or group in the component dialog.
If any group that specifies a Tekla tab or group is found in the Grasshopper definition, all params, panels or images that are not in one of these groups will be hidden from the component dialog.
If desired, a param within one of these groups (which would normally be shown in the component dialog) can also be hidden by including the parameter in another (nested) group that is named Hidden.
Back to topAdvanced dialog layout options
To further customize the look of the dialog, you can group the attributes into columns and position images behind attributes.
See an example here showcasing the possibilities in this section: https://drive.google.com/file/d/1e_2FzaOowdCjC_4pJpVSfyZVUG1p-0nr/view?usp=sharing


To display attributes in several columns
- Put parameters that should appear in the same column in the dialog into a Grasshopper group, and name the group "C1" or "C2", etc.
- The column width can be set in pixels by adding a number to the column name (e.g. "C2 300").
- Or set the relative width of the column by using percentages (e.g. "C2 200%").
- Column groups can optionally be added to a single supergroup to make sure they belong to the same table.
- Attributes in columns won't show any sliders, to save space.
- A panel with an empty row can be used for spacing or to create an empty cell in the column/table.
To remove an attribute label completely, name the parameter or component "." (a dot) in Grasshopper.
- Now only a field is shows for the attribute value in the dialog.
To change the size and position of images, put the image in an Image Sampler component and name it e.g. "300 L120 T20". This means
- "300" = Set image width to 300 px
- "L120" = Position the image Left and offset 120 px. "R" is used for positioning it to the right.
- "T20" = Offset 20 px from the top.
To move images to the background and allow attribute fields to be shown on top of the image, put the image in an Image Sampler component and add "BG" to the name, e.g. "BG 300 L120 T20". This means
- "BG" = Set the image as a Background image. The image will be shown behind params that are added below it in the definition. "Background" can also be used.
Setting Tolerances and Units
The Rhino tolerance when solving is set to 0.1 mm per default, and the angle tolerance to 0.1 degrees. To change this, add a panel and name it "Rhino Tolerance" or "Rhino Angle Tolerance" respectively somewhere on the canvas, and add the tolerance value as text to the panel.

Similarly, the units can be changed by using a panel and name it "Rhino Units" somewhere on the canvas, and add the unit value as text to the panel.
- Possible values are "mm", "cm", "m", "in" and "ft" (or their expansions).
If these panels are used, a tab called "Settings" will show up in the plugin dialog where the values can be adjusted separately for any plugin instance.
Keep in mind that a too low value for the tolerance might result in problems. For example it might make the meshing too fine around the edges of cuts, making the item insertion fail in Tekla. As a comparison the internal tolerance in Tekla for detailing operations is on the order of 0.3 mm.
Back to topWhat gets solved when a component is inserted?
When a component runs in Tekla, the following components in the Grasshopper definition will always be solved:
- Components that create objects in Tekla (from the Grasshopper-Tekla link)
- Components that modify objects in Tekla (from the Grasshopper-Tekla link)
- C# and other scripting components
- Upstream components connected to any of the above components will also be solved, including user objects and 3rd party library components.
Sometimes you might wish to solve other component types, like various export components. To force solving of any component not in the above list (and its upstream components), you can put the component inside a group and name it "Solve". Alternatively connect any output from the component to a panel and name it "solve" or "output", as described in the next section.
Back to topShowing output messages
When a component is inserted and the definition runs, warning and error messages from the Tekla components will be shown in a messages dialog that pops up in Tekla. To override this and suppress these messages, put the component in a group and name it "Hide" or "Hidden".
You can show custom output messages in this dialog by adding a panel to the definition and change its name to start with "Output" or "O:" followed by an optional heading, and then connect something to the panel's input. The content of this panel will show up in the messages dialog. This will also cause all upstream components to solve. If the panel is named "Solve" instead, upstream components will be solved but the output will not be shown.

Editing a definition
Each time an inserted component is modified, it will call the Grasshopper definition file. This means that editing a Grasshopper definition will change the behavior of any already inserted components that use that definition, if the inserted components are modified in the future.
Note: Adding or removing parameters in a definition means that property values for already inserted components in Tekla might become invalid.
The Grasshopper definition can be opened directly from the component dialog for viewing or (light) editing by using the Pen button.

When opening a definition this way, the Grasshopper solver will be disabled. Note that this quick editor has some limitations (selections behave weirdly, you can’t pick in Rhino or Tekla, objects get generated in the wrong locations).
Because of the above limitations, it's recommended to open the definition in a stand-alone instance of Grasshopper instead for any substantial editing.
Once you have edited and saved the definition in Grasshopper, you can reload the definition from the component dialog to read in the updates using the Reload button.
If you now modify already inserted components from the dialog or by changing their inputs, they will adjust according to the updated definition.
Back to topThings to consider
- Using Rhino.Inside requires a license of Rhino, and the license will be reserved the first time the Grasshopper Component is triggered during a Tekla session. In case you’re using a floating license system, make sure that there is a Rhino license available prior to opening the Grasshopper component. Otherwise the component might freeze Tekla Structures because it can’t get hold of a license.
- The Rhino license will be released once Tekla is shut down or restarted. Because of how Rhino.Inside works, there’s no way to release the license manually without terminating the Tekla process completely.
- Property parameters can be single-item only, which means it’s not possible to send lists to the definition from a Tekla component. Multiline text input is possible though, by using \n as the line break in the dialog text fields.
- Text-based, integer, number and Tekla Catalog type params can be converted to component properties. To expose other kinds of params like time, intervals or GUIDs they need to be added to the Grasshopper definition as e.g. text params, and the text value can then be converted to the appropriate type further downstreams in the defintion.
- There can be a maximum of 200 integer (int) params, 200 number (float) params and 200 text (string) params loaded into the dialog as properties from a definition. E.g. Value Lists and Tekla Catalog params are counted as text. In versions prior to 1.2, the limit was 100 of each parameter type.
- The Grasshopper components are subject to the same limitations as other Tekla plugins/components, e.g
- There can be a maximum of 10 different model input params.
- In total, a maximum of 99 points or model objects can be picked as input when inserting any single component.
- It’s not possible to make a component request multiple lines or polylines as input by using the "Multiple" prefix.
- Properties in any saved component preset file will be named generically e.g. string_0, string_1, string_2 etc. This cannot be changed.
- Opening the Grasshopper definition from the component dialog for editing or running might not be smooth (selections behave weirdly, you can’t pick in Rhino or Tekla, objects get generated in the wrong locations etc). Light editing is usually fine, otherwise you can edit, run and test the definition more smoothly by opening a stand-alone Rhino and Grasshopper instance.