but the examples do not help and i guess the main reason are my scripting skills.
This forum post Creating text objects and outputting them as normal Rhino geometry is exactly what i have tried and the python and c# example works exactly the way i want but these scripts are to complicated to me.
It would be cool to understand this created class to preview non grasshopper objects and also preview grasshopper objects without an output maybe in the future.
But my second try succeed with creating a TextEntity object and previewing as surfaces.
Unfortunatly baking text entity take the dimesion style changes not into account.
import Rhino as rh
import scriptcontext as sc
# get dimstyle and change settings
ds = rh.DocObjects.DimensionStyle()
# change text properties ( a lot of options )
ds.Font = rh.DocObjects.Font(F)
ds.TextHeight = H
#ds.TextVerticalAlignment = rh.DocObjects.TextVerticalAlignment.Bottom
# create textentity which is not visible for grasshopper
te = rh.Geometry.TextEntity.Create(T,P,ds,False,0,0)
# create textentitysurface which is visible
# for preview what you get if you bake the text entity
a = rh.Geometry.TextEntity.CreateSurfaces(te,ds,0,0)
# bake text with same settings like textentity to get rhinotext object
sc.doc = rh.RhinoDoc.ActiveDoc
sc.doc = ghdoc