Grasshopper

algorithmic modeling for Rhino

Within the DotNet VB script component of Grasshopper, I would like to programmatically select pre-existing objects by the Rhino’s object name. In the Rhino environment, I would use the “_SelName” command and give it the name I gave the object within the properties window. I’m sure there is a compatible GH VB script command for this. Thanks.

Views: 1125

Replies to This Discussion

On the most recent version of grasshopper you can do this without using a vb script. If you pass along a string to a parameter (for example a text note connect to a surface parameter), and the string corresponds to the name of an object, the object will be referenced.
Vicente, I was playing with this recently. If more than two objects have the same name, does the component reference both (or all) of the objects? I can only get it to reference the most recently created object with that name.
It probably has to do with the lookup algorithm David uses. I guess you'll have to use a vb script for the time being that doesen't stop looking when the matching name is found.

I think this feature was added rather quickly. It suffers also from not updating the definition when the geometry changes, just like when you reference geometry using a dotnet script.
Vicente,

I definitely have a lot to learn still.
Thank you for your quick response. This is what I am looking for.

Sam

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service