Load the text Height value from the current DimStyle

Hi there,
I am trying to load the Text Height value from the rhino doc active Dimension Style into Grasshopper through the GH Python component.
I was thinking of running the following code which works in the rhino doc python editor but load a “None” value in Grasshopper :

import rhinoscriptsyntax as rs import scriptcontext as sc

sc.doc = rh.RhinoDoc.ActiveDoc

if start: dimStyle = rs.CurrentDimStyle() textHeigh = rs.DimStyleTextHeight(dimStyle)
# print textHeight --> "None" arrowSize = rs.DimStyleArrowSize(dimStyle)
`# print arrowSize --> “50”``

sc.doc = ghdoc

Does anybody have an explanation or an other way of doing this ?

Thanks for your help

Hi again,
Actually a friend of mine just gave me the solution :

import Rhino as rc TextHeight=rc.RhinoDoc.ActiveDoc.DimStyles.Find(NomStyle,False).TextHeight

But it doesn’t explain me the first issue anyway.

Hi Baptiste,

Please attach your .gh file.
Thank you.

Here is the file.
Thanks for having a look on this.
textHeight.gh (4.6 KB)

Your file and code are correct. It outputs 3.5 for both textSize and arrowSize. Try restarting your Rhino. Maybe it got a bit confused when it switched the documents.

Ok you’re right.
I restarted rhino and it works well now.
Thank you and sorry for the fake issue.