Ghpython script to bake an object automatically

Hi All,

I have made an object using Grasshopper and I am trying to bake the object automatically whenever I change the dimension of the object. I am trying to use Ghpython script to do this. My question is

  1. Would it be possible to do this using the Ghpython script? (if not, what component can perform what I am trying to do?)

  2. How the script should be?

Thank you in advance
Regards

Baking = attaching Rhinocommon objects to the active document
=> Rhino.RhinoDoc.ActiveDoc.Objects.AddPoint(1, 1, 1)

Hi Tom,

Thank you for the suggestion,
The coding you wrote
’ Rhino.RhinoDoc.ActiveDoc.Objects.AddPoint(1, 1, 1)’
Where do I have to write? Gypython? or Rhino python script?

It would be really good if you can suggest a more detailed process.

everywhere you want.

You’ll need to “import Rhino” of course. Forgot to mention this. However if you have trouble in understanding simple function calls, then you might walk through a Python tutorial at first.

Hope I could help

Also, if you’re in GHPython you’ll need to set the script context to the Rhino document first, like so:

import Rhino as rc
import scriptcontext as sc

sc.doc = rc.RhinoDoc.ActiveDoc