Grasshopper

algorithmic modeling for Rhino

Hi :)

I'm trying to get the layer name of a specific object in order to output values from the object as well as their matching layer name to a .txt file.

Below I have started the first step but don't know how to access the object proporties in the VB script.



Any help would be appriciated, thanks!!

Elizabeth

Views: 2863

Attachments:

Replies to This Discussion

Yep, thanks Daniel!
Use this code:

Dim objref As New MRhinoObjRef(New Guid(x))
Dim att As New MRhinoObjectAttributes(objref.Object.attributes)
a = doc.m_layer_table(att.m_layer_index).layername

Connect to the 'x' input a guid parameter that is connected to the referenced curves. Set the 'x' input as a string.
Perfect, thank you- I hadn't used the guid parameter before, works well!!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service