Grasshopper

algorithmic modeling for Rhino

I have a very quick questions, I am doing the grasshopper plugin in visual C#, I want to extract the material by doing this:
Rhino.DocObjects.Material mat = Rhino.RhinoDoc.Materials[mtsc];
But it always return me an error like this: An object reference is required for the non-static field, method, or property 'Rhino.RhinoDoc.Materials.get'
 
Any ideas?

Views: 373

Replies are closed for this discussion.

Replies to This Discussion

You first have to get an actual document. You cannot access that method using just the typename, as it isn't static.

Thanks David! Got it figured out right after the post. 

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