hi all,
if a DimensionStyle is used to create a TextEntity the DimensionStyle is not taken into account if the TextEntity get baked.
How can i force
Rhino.RhinoDoc.ActiveDoc.Objects.AddText(TextEntity)
to use the changes in DimensionStyle.
import Rhino as rh
import scriptcontext as sc
# get dimstyle
ds = rh.DocObjects.DimensionStyle()
# change text properties in dimstyle
ds.Font = rh.DocObjects.Font('Arimo')
ds.TextHeight = 4
ds.TextVerticalAlignment = rh.DocObjects.TextVerticalAlignment.Bottom
# create textentity
te = rh.Geometry.TextEntity.Create(T,P,ds,False,0,0)
# bake textentity to get rhinotext object
if Bake:
sc.doc = rh.RhinoDoc.ActiveDoc
rh.RhinoDoc.ActiveDoc.Objects.AddText(te)
sc.doc = ghdoc
In this post How to preview Text3d in Rhino i dont use TextEntity object to AddText instead the whole settings used for TextEntity DimensionStyle is setup again to get a baked text with changes.
If i use TextEntitySurface the dimestyle is taken into account.
I am confused and help is appreciated.