Grasshopper

algorithmic modeling for Rhino

Can sb help me how i can write a VB script on rhino to inquire object colors?

Views: 499

Replies to This Discussion

Try something like:

 

Private Sub RunScript(ByVal x As Guid, ByRef A As Object)    

Dim attr = RhinoDoc.ActiveDoc.Objects.Find(x).Attributes   

A = attr.ObjectColor

 

Note that the input is asking for a GUID. I usually do this by passing the referenced geometry through an "ID" parameter before passing it into the script. You may also be interested in attr.ColorSource, which will tell you whether the color of the object is by layer or by object. 

u re usin such structures particular to rhino attributes. "Dim attr = RhinoDoc.ActiveDoc.Objects.Find(x).Attributes" in order to call them

 

can u tell me pls where i can find a list of such attributes for VB and C. when i want to write a program i cannot make the TAKE OFF.

thnx

Try the RhinoCommon SDK - http://www.rhino3d.com/5/rhinocommon/

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