TextEntity.CreateCurves doesn't use TextHeight

Hi,
I am trying to create text curves using TextEntity directly in Python. The snipped from my Python script looks as follows:
texttainer = Rhino.Geometry.TextEntity()
texttainer.Text = “Some Text”
texttainer.Plane = Rhino.Geometry.Plane.WorldXY
texttainer.Justification = Rhino.Geometry.TextJustification.BottomLeft
texttainer.TextHeight = 100.0
texttainer.FontIndex = scriptcontext.doc.Fonts.FindOrCreate(“MecSoft_Font-1”, False, False)
textcurves = texttainer.CreateCurves(scriptcontext.doc.DimStyles.BuiltInStyles.CurrentDimensionStyle , True)

    for textcurve in textcurves:
       scriptcontext.doc.Objects.AddCurve(rs.coercecurve(textcurve))

Works, but all the text is exactly as high as the base unit of the model (1mm in my case) and the text resides at the world coordinate system’s origin.

I suspect, that TextHeight doesn’t set the height in the CurrentDimensionStyle properly or I need to use a different DimensionStyle.

Also I am wondering if there is a simple way to place the text curves at a specific position in the XY plane?

Any help would be appreciated (I know that I could script that using the Rhino command interface, but that’s not the point here).

Thanks a lot,
B.

Just solved the first part myself:
Using

texttainer.DimensionStyle in the CreateCurves method (instead of the CurrentDimensionStyle) is the one to use.

Remains the position part.

I feel really smart today :wink:

The second part (positioning) is easily done by using
texttainer.Translate(,,)

Sorry to have bothered you.
I am still on a steep learning climb…

B.

Or have a custom plane for texttainer.Plane

i.e.

pt=rs.GetPoint() #or some other point method for determining your insertion point
plane=Rhino.Geometry.Plane.WorldXY
plane.Origin=pt
texttainer.Plane=plane
#etc