Grasshopper

algorithmic modeling for Rhino

I'm trying to control a GraphMapper from inside a Python script.

I've been able to adjust the graph limits like:

myGraph.Container.X1=sliderValue

and it works fine, the numbers in the corner update and the output values change

Then i can change the grips with:

myGraph.Graph.Grips[0].Y=sliderValue

and the grips move up or down, but the curve doesn't update and the values don't change.

Anyone have experience with this and can point me to how I might get the updated curve and values?

Views: 629

Replies to This Discussion

Hi,

maybe late reply, but if you still need this:

import Grasshopper as gh

for obj in ghenv.Component.OnPingDocument().Objects:
if type(obj) == gh.Kernel.Special.GH_GraphMapper and str(obj.NickName) in GRAPH:
obj.Container.X1 = X1
obj.Container.X0 = X0
obj.Container.Y1 = Y1
obj.Container.Y0 = Y0
obj.ExpireSolution(True)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service