Grasshopper

algorithmic modeling for Rhino

Hi, 

Has anybody ever manipulated Rhino layer properties from code? I do the following without error but don't get any change done!?

Dim LayerIndex As Integer = Rhino.rhinodoc.ActiveDoc.Layers.Find(LName, True)
Print(LayerIndex)

Rhino.rhinodoc.ActiveDoc.Layers(LayerIndex).Color = LColor

Views: 689

Replies to This Discussion

have you tried running

Layer.CommitChanges()

? I think only then the document is notified.

(I havent tried this)

Thanks Daniel, but it did not commit the changes! very confusing, because there is not even an error message!

HI Pirouz

You should use Rhino.RhinoDoc.ActiveDoc.Layers.Modify (),

Thank you very much! it finally worked with "modify"! :)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service