Grasshopper

generative 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

Tags: Layer, Name

Views: 109

Attachments:

Reply to This

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!!

Error: Overload resolution failed because no accessible 'New' can be called without a narrowing conversion: (line 82)

i receive this error message. what is wrong with mine

GUYS I HOP YOU CAN HELP ME.

I AM TRYING TO CREATE A BILL OF MATERIAL. I HAVE A SCRIPT THAT CALCULATES EACH STRUCTURAL PROFILES GROSS LENGTH.

 

NOW MY PROBLEM STARTS. EACH SINGLE PART IS NAMED BY A UNIQUE LAYER. THEREFORE I HAVE TO MACH THIS LENGTHS WITH THEIR OWN LAYER NAME. CAN YOU HELP ME?

 

JUST SHOW ME HOW I CAN CALL THE LAYER NAME OF A BREP AS SCRIPT I SOLVE REST OF IT

RSS

Translate

Search Grasshopper

Members

Photos

  • Add Photos
  • View All

© 2012   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service