Something wrong about the two code(get text position)

this is ok.
below in the gh ,can’t get the text position

the type of 文本 is guid,and something others also is wrong

There are a few problems here:

  1. GH in Rhino 7 doesn’t support Text objects natively.
  2. It looks like you’re not using the input and output variables
  3. non ASCII characters as variable names.

For 3. I’m not sure whether that is a problem anymore, technically, though in my experience, that always leads to problems at some time. I always recommend to stick to ASCII characters with variable names.

I recommend to read through this page about the basics of python scripting in Grasshopper: Rhino - Your First Python Script in Grasshopper (

import scriptcontext as sc
import Rhino as rh
sc.doc = rh.RhinoDoc.ActiveDoc


sc.doc = ghdoc