Oops...

This website is made for modern browsers. You are seeing this, because your browser is missing a feature or two. Please install the latest update or switch to a modern browser. See you soon.

Canvas search

#UI

Grasshopper offers a search function that gives us quick access to all available components. Double-clicking on an empty space on the canvas or hitting Space opens a search box that lets us find components by keywords. Once we are familiar with the components' names, this method provides a faster flow than hunting for icons in the tabs.

After starting to type, the search dialog suggests components that match our input by scanning all components' names and nicknames. The nickname can be found (if there is any) by hovering a component (see figure below). For example, by typing ccx we can find the component Curve | Curve. After hitting Enter, the selected component is placed on the canvas.

The component Curve | Curve has the nickname CCX

Besides using the predefined nicknames, we can set a personal Component Alias which will then also be searched for. For this, we right-click the desired component in the ribbon tab and then assign a custom Component Alias.

Special shortcuts

Some components can be invoked with special shortcuts and thus, are not placed on the canvas with default values but can be preconfigured through the canvas search. For example, when we begin our query with a quotation mark, a Panelis creating and its content is set to whatever followed the quotation mark: "Hello becomes a panel with Hello.

The following shortcuts can be used within the search dialog:

ShortcutFunction
"abcCreates a Panelwith content abc.
//abcCreates a Panelwith content abc.
<123Creates Smaller Thanand input B is set to 123.
>123Creates Larger Thanand input B is set to 123.
+123Creates Additionand input B is set to 123.
-123Creates Subtractionand input B is set to 123.
*123Creates Multiplicationand input B is set to 123.
/123Creates Divisionand input B is set to 123.
\123Creates Integer Divisionand input B is set to 123.
=123Creates Equalityand input B is set to 123.
%123Creates Modulusand input B is set to 123.
&abcCreates Concatenateand input B is set to abc.
!Creates Explode Tree.
~abcCreates a Scribblewith content abc.
1,2,3Creates a Pointwith coordinates 1,2,3.
123Creates a Number Sliderpreset to the value 123. Steps size are integers.
1.23Creates a Number Sliderpreset to the value 1,23. Slider accuracy correlates with the decimal places.
1<5Creates a Number Sliderwith a numeric domain from 1 to 5 and presets the value to 1. Steps size are integers.
1..5All Number Slidershortcuts can also be written with two .. instead of <.
1.0<5Creates a Number Sliderwith a numeric domain from 1.0 to 5.0 and presets the value to 1.0. Slider accuracy correlates with the decimal places.
1<3<5Creates a Number Sliderwith a numeric domain from 1 to 5 and presets the value to 3. Steps size are integers.
1.0<3<5Creates a Number Sliderwith a numeric domain from 1.0 to 5.0 and presets the value to 3.0. Slider accuracy correlates with the decimal places.

Even though input B can be set directly on some components, it’s highly recommended to not use this shortcut, but to assign the value later with another component. Internally set values are much harder to debug later and thus compromise the readability of our algorithm. Nevertheless, the shortcut still creates the desired component even if no value is provided.

This page is open source. Edit it on GitHub or see how you can contribute.

Up next