Faster scripts in Grasshopper

How to create grasshopper scripts faster?

Some time ago, in the Grasshopper tips and tricks series, I had presented my personal list of 8 favourite grasshopper shortcuts (Link), 5 tricks to defeat spaghetti monster (Link) and 5 tips to better collaboration (Link). This time I will share with you tricks on how to be quicker in Grasshopper and create scripts in a faster way. To script like a pro, I really recommend printing out a list of shortcuts (at the end of this post) and starting using them at your daily work. If you haven’t heard about them, now is a time to step into the next level of scripting. Make sure that you went through the whole list of pop-up shortcuts and haven’t missed the Grasshopper tip at the very end of this post which is fantastic!

TIPS HOW TO CREAT SCRIPTS IN GRASSHOPPER FASTER

1. Scribble

Let’s start with the first pop-up shortcut. Everybody knows the scribble component, right? Scribble is a component that allows you to write your text on your canvas. However, you don’t have to choose a scribble component from the ribbon list whenever you want to use it. Entire content will be placed in a scribble object when writing after a tilde symbol ~.
Here is the rule:
GIF with an explanation - how to use scribble

2. Panel

The second one is used by all of the users. Two forward slashes (//) or a double quote (“) will generate a text panel. Double click on your canvas, put two slashes and start writing your text. Text will be placed automatically in the panel, and size will be adjusted according to text length.

3. Sliders

Slider pop-ups are not so complicated. If the format can be evaluated as a single numeric value, a slider will be created with the specified initial value.

In pop-up formats, we can also define the limit of the slider. Two numerics separated by a `smaller than` symbol or two dots will create a slider with the specified limits. The initial slider value will be equal to the lower limit.

You can define the slider by three numerics. The first one will determine the lower limit, and the last one will represent the highest limit. The initial slider value will be the number in the middle. Moreover, adding to one of the numbers some digits after the dot will define the precision of the whole slider.

Note that it is possible to insert negative values in the slider component. Let’s say we would like to have the input slider equal to -10. Just after writing -10 in the command box, add two dots or smaller than the symbol -10.. or -10<

GIF with an explanation - how to creat limits in slider

4. Calendar

We go to the next one, two or three numerics separated by forward slash will create a calendar object. The order of the value is month, day and year. If a year is omitted, then a current year will be used.

Here is the rule:
Note that a second slash is required. #/# is interpreted as a mathematical operation and thus results in a slider.

5. Clock

Okay, so we have the date on our calendar. Now we need time on our clock. If the format contains at least two numerics separated by the colon (:) a clock object will be created. Seconds are optional here and not needed to write, and it’s unnecessary to define if it’s before noon or afternoon.

Here is the rule:
Learn Grasshopper

DOWNLOAD 5 STEPS TO LEARN GRASSHOPPER

5 Steps to learn Grasshopper is a guide full of books, exercises, tutorials and videos. Everyone will find something for themselves – regardless of the level of initiation.

Next tips for fast creations of Grasshopper skripts

6. Point

Usually, a component creates a point with three inputs (x,y,x). However, you can do it much quicker: If the format contains two or three numerics separated by the commas, a point from the primitive list will be created with the specified coordinates.
Here is the rule:
Note that typing just two digits after the commas will create a point on the x plane with the z coordinate equals zero.

7. Domain

Place ¨to¨ between two integers, and you will get a domain ready to use. Use a panel and write the bounds with a to in the middle. Insert 0 To 5 in the panel, and the domain will be defined from the first decimal (0) to the second one (5). Whenever a component requests for a domain, this string format will be converted to one.

GIF with an explanation - how to creat a domain

8. Mathematical components

And of course, almost all mathematical components can be used with the use of pop-up shortcuts.

List with the rest of the mathematical pop-up shortcuts can be found below.

9. An awesome trick for faster Grasshopper script creation

This list was just a drop in the ocean of pop-up shortcuts. The problem is that the search tool in Grasshopper doesn’t work precisely. Whenever you search the component, you need to correctly write down the full name, and it doesn’t always work. Usually, the first result will be the most relevant. Usually, because the full name must be written correctly.

If we go more to the top, we get less relevant components, and at the top, you can even find rhymes 😂 Who search components by their rhymes? Really! Useless feature .

However…

…you can help the Grasshopper searching engine in a straightforward way.

10. Download the whole list of POP-up shortcuts

I’m pretty sure that you will find on this list some shortcuts which you didn’t know before. CLICK below to download the entire list of shortcuts. Print out and hang out over your desk to be even faster when working with the Grasshopper scripts.

Skripts in Grasshopper pop-ups
CLICK image or a button under in order to DOWNLOAD the Grasshopper POP-UP Shortcuts list

Do you have any questions?

What tricks are you using for fast creating of Grasshopper scripts?

Write an email at [email protected]

I always write back !!

Check out more tricks in Grasshopper

Grasshopper useful components

Grasshopper Data Tree – Path Mapper is a BADASS


If you want to get more information about Grasshopper and learn parametric modelling, download the free guide
 – FREE DOWNLOAD

Grasshopper is a plugin to Rhino that you can download HERE 

Did you like that post ? Share it with others !

We spend a lot of time and effort creating all of our articles and guides. It would be great if you could take a moment to share this post !

Share:

Comments:

Subscribe
Notify of
guest
2 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Michael
Michael
2 years ago

Hello Krzysztof
I like your videos and is always helpful to me as a beginner in grasshopper , I noticed that you used tree cluster node that can show the path and the elements numbers in the viewport .where you get this from where i can find it ..can you share it ?

Thank you
Michael Mousa

Last edited 2 years ago by Michael

Author:

Download BIM CASE STUDIES:

After reading this guide you will learn:

  • How BIM is used on the biggest projects in Norway
  • What were the challenges for the design team and how were they solved
  • What were the challenges on the construction site and what was our approach to them

Newest articles: