Automating Grasshopper Part 2
In this tutorial we take a look at automating a couple of sliders to with Rhinoscript. We also use the GUID viewer to get the GUIDs of Grasshopper Components. This little tool is helpful becuase you don't have to copy and paste and dig through XML code to find the GUID you need.
import rhinoscriptsyntax as rs import Rhino import time #Load Grasshopper plugin as gh gh = Rhino.RhinoApp.GetPlugInObject("Grasshopper") #SetSliderValue("GUID",Number) rs.EnableRedraw(True) for i in range(0,3,1): gh.SetSliderValue("GUID_FOR_SLIDER_1",i) for j in range(0,2,1): gh.SetSliderValue("GUID_FOR_SLIDER_2",j) gh.RunSolver("FILENAME.gh") time.sleep(1)
Want to Contribute?
Want to be an author? Drop us a line here we'd love to have you.
Already have a video you'd like to post? Send us a link and we'll get you going.