Grasshopper

algorithmic modeling for Rhino

Hi,

is there a possibility to get reference to the last created object automatically with grasshopper? i found an vb.net example at mcneel wiki for an eventwatcher (http://wiki.mcneel.com/developer/dotneteventwatcher).

can one use that in the vb.net grasshopper component or am i barking up the wrong tree? i'm not familiar with vb.net...so far

Heiko

Views: 381

Replies to This Discussion

..always when an new box is added to the rhino document it shall be referenced to grasshopper automatically

Hi Heiko,
would the Geometry Pipeline component suffice for your goal?

A one line script that seems to work, but is a bit hacky is this:

It'll give you back the objectid of the last created object. (by experiment, I'm not sure if the first object in the table is always the last inserted one, very simple tests seemed to suggest so.

    A = RhinoDocument.Objects.First().Attributes.ObjectId;

Oow nice one Arend, thanks:)
I played a bit with both approaches and attached the definition.

Attachments:

nice.

thank you both very much

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