as far as I know, the GHPython component doesn’t support the “preview” of a few types of objects, (text and hatches for sure…maybe some others?). @stevebaer or @piac would certainly know better. I believe the C# component does not have this limitation. Some info here:
You can bake the objects, (doesn’t solve your preview issue, but…), you could do something like: (note; I’m not certain if it’s best practice to put the sc.doc stuff in the function).
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
def BakeStuff():
sc.doc = Rhino.RhinoDoc.ActiveDoc
rs.AddText(x, [0,0,0])
sc.doc = ghdoc
if Bake:
BakeStuff()