Grasshopper

algorithmic modeling for Rhino

Hi Guys,

I am trying to automate sellecting all the componants in the Grasshopper Group. I couldn't find the function in the Grasshopper SDK that do the same work as the sellect all command when we write click on the group on the GH Canvas. Does any one have an idea what is the proper function to use ??. 

Views: 376

Replies to This Discussion

When we right click I meant !.

Perhaps I misunderstood the question, but if you want the list of components, you can do so:

Dim server As kernel.GH_ComponentServer = instances.ComponentServer

For Each tab As GUI.Ribbon.GH_LayoutTab In Server.CompleteRibbonLayout.Tabs
print(tab.Name)
For Each panel As GUI.Ribbon.GH_LayoutPanel In tab.Panels
print(" " & panel.Name)
For Each item As GUI.Ribbon.GH_LayoutItem In panel.Items
Dim proxy As igh_ObjectProxy = server.EmitObjectProxy(item.Id)
print(" " & proxy.Desc.Name)
Next
Next
Next

Attachments:

Thnx Daniel for the answer.

Although I appreciate your script, but actually you miss understood me.

If you press right click on any group on the canvas there is a command is called select all. This command selects all the components inside the group. I want to script the same command.

Thnx again !.

It has to do with the attributes in the group. I may have found a solution for it.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service