# List of all components with their explanation / Search for a component based on it explanation

**URL:** <https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369>\
**Category:** Grasshopper\
**Created:** [July 21, 2018, 11:02pm UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369 "2018-07-21T23:02:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manoochehr\_a](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/manoochehr_a/32/60170_2.png) [@Manoochehr\_a](https://discourse.mcneel.com/u/Manoochehr_a)\
**Post date:** [July 21, 2018, 11:02pm UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369/1 "2018-07-21T23:02:47Z")

</div>

Hi, Is there anyway in GH 0.9 to search based on explanation for a component. This will be helpful because sometimes you do not know the name of the component you are after. however, you can write few words to explain it. Any idea? Thanks

---

<div class="post-metadata">

**Author:** ![ivelin.peychev](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ivelin.peychev/32/676038_2.png) [@ivelin.peychev](https://discourse.mcneel.com/u/ivelin.peychev)\
**Post date:** [July 22, 2018, 1:58am UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369/2 "2018-07-22T01:58:36Z")

</div>

you can set alias for each component, just right click on the icon of the component in the ribbon, then you can search with that alias

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/5/5/55d210c835ac642896ce2e3f0fb5b6b4abb62b9c.png)

---

<div class="post-metadata">

**Author:** ![RIL](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ril/32/771758_2.png) [@RIL](https://discourse.mcneel.com/u/RIL)\
**Post date:** [July 22, 2018, 1:58am UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369/3 "2018-07-22T01:58:40Z")

</div>

If you can accept typing the search term into a Text Panel then you can use a custom script.

In the description text below there’s a word “ **area** ” (although also in the NickName, but I used what I had on screen when reading this post), and the script visibly selects all components on the canvas with this word in the component description:

 ![bild](https://global.discourse-cdn.com/mcneel/original/3X/1/9/196f43507c3464076a5301eed1b79d6172705b3f.png)

The code:

```auto
  private void RunScript(string SearchTerm, ref object A)
  {
    var cmp_list = new List<GH_Component>();

    for (var i = 0; i < GrasshopperDocument.ObjectCount; i++)
    {
      var obj = GrasshopperDocument.Objects[i];
      if (obj is GH_Component)
      {
        GH_Component cmp = obj as GH_Component;

        // using regular string function, case sensitive search
        if (cmp.Description.Contains(SearchTerm))
        {
          cmp_list.Add(cmp);
          cmp.Attributes.Selected = true; // Visibly select
        }
      }
    }

    A = cmp_list; // output also the component list
}

```

[SearchDescriptionText.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/c/a/caa91651602484acc31d223572428576ba53e2aa.gh) (12.7 KB)

// Rolf

---

<div class="post-metadata">

**Author:** ![ivelin.peychev](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ivelin.peychev/32/676038_2.png) [@ivelin.peychev](https://discourse.mcneel.com/u/ivelin.peychev)\
**Post date:** [July 22, 2018, 1:59am UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369/4 "2018-07-22T01:59:30Z")

</div>

oh, did I misunderstand the question? 😃

---

<div class="post-metadata">

**Author:** ![Manoochehr\_a](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/manoochehr_a/32/60170_2.png) [@Manoochehr\_a](https://discourse.mcneel.com/u/Manoochehr_a)\
**Post date:** [July 22, 2018, 2:15am UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369/5 "2018-07-22T02:15:26Z")

</div>

Thanks for your tricks. I think I have not been clear enough in my question. I would like to be able search between all of my components based on their description and find components with the words that I type.  
Please see below.

 ![Q1](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/9/4/941c436260eaffe1548ba32a47fd0337df6bee84.png)

---

<div class="post-metadata">

**Author:** ![ivelin.peychev](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ivelin.peychev/32/676038_2.png) [@ivelin.peychev](https://discourse.mcneel.com/u/ivelin.peychev)\
**Post date:** [July 22, 2018, 6:18am UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369/6 "2018-07-22T06:18:47Z")

</div>

By “…all of my components…” do you mean all components that are in the ribbon or the components placed on the canvas. It is still unclear.

double click on the empty canvas, brings you a search bar where you type, but I don’t think it is based on description rather it is searching for alias and names of the components. As mentioned above you can set alias to each component.

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/b/eb3f10002cc72e84a2ba66c774f11a7bc1aa956c.png)

Perhaps @DavidRutten can say more, of what is possible and if search of description is supported.

---

<div class="post-metadata">

**Author:** ![RIL](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ril/32/771758_2.png) [@RIL](https://discourse.mcneel.com/u/RIL)\
**Post date:** [July 22, 2018, 11:28am UTC](https://discourse.mcneel.com/t/list-of-all-components-with-their-explanation-search-for-a-component-based-on-it-explanation/67369/7 "2018-07-22T11:28:14Z")

</div>

> [@Manoochehr\_a](#):
>
> all of my components

OK, my example only checked the components on the canvas.

So then the loop in the script should be completed with loops through all the installed plugins and their components and check their descriptions.

// Rolf
