Grasshopper

algorithmic modeling for Rhino

I am currently using an object's name attribute as a parameter, but I have to manually force a recalculation of the solution any time I change this attribute in Rhino.  Is it possible for Grasshopper to recalculate the solution after a referenced object's attributes are changed in Rhino?

I assume this probably requires adding an event listener in C# (my preference) or VB.  Any help would be greatly appreciated.

Thanks

Jason

Views: 1064

Replies to This Discussion

Any thoughts?

I don't have idea with event...

but you can make object attribute compare component,

maybe...

1. get all object attributes and assign to output

2. feed this output with hoopsnake again to input.

3. compare input and newly gained object attributes

So you have a Rhino object in a 3dm file (loaded in Rhino) and the name of the object changes. You want Grasshopper to detect this and update itself? I assume the object is referenced using a standard Geometry/Curve/Surface/Brep/Mesh parameter?

I'll need to look into this tomorrow (bedtime for people in Slovakia now).

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Correct.  I have a series of Rhino objects, each referenced using the standard Brep component.  Each objects name contains a parameter (in this case, an number) that I read using a simple C# component.  When I make a change to an object name in Rhino, I have to manually force the solution to recalculate.

Assuming it is possible for GH to listen to changes in object name, would be also be possible to listen for changes to other object attributes and/or user text (I suppose the later is a better place to store parameters...I like the object name only because there is already a GUI in Rhino to view/edit object name).

I have attached the relevant portion of my solution.

Thanks in advance for your help.

Jason

Attachments:

Yeah, Grasshopper doesn't pay attention to things like layers and colours and names, only changes to geometry are treated as expiration/recomputation events. The geometry pipeline does pay attention to these events, but I doubt you'll be able to use it for this.

There's also no way to specifically expire all parameters that happen to reference a certain object, at least not without iterating over all parameters and then iterating over all persistent data and figuring out which parameter reference the object ID you're changing.

I don't see a solution for you yet, I'll keep digging a bit deeper.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

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