Hi,
I am evaluating Rhino hoping to move from Vectorworks / Cast.
Everything looks great so far but I am missing a few tools for creating 2D plots. Python to the rescue…
Question:
I am making a small script to generate the equivalent of Vectorworks ‘Dimension Tapes’. Everything works perfectly but I am having trouble with the text styling.
I want to use the default text styling in the script and have attempted
JUSTIFY_MIDDLE = 2
DIMSTYLE = rs.CurrentDimStyle()
PRECISION = rs.DimStyleLinearPrecision(DIMSTYLE, 2)
HEIGHT = rs.DimStyleTextHeight(DIMSTYLE, 1.5)
FONT = rs.DimStyleFont(DIMSTYLE)
textID = rs.AddText('0', (0,0,0), HEIGHT, FONT, 0, JUSTIFY_MIDDLE)
However it seems as FONT is returning the selected styling of the current font (‘Regular’), rather than the font name (‘Arial’)
As consequence the script throws an error
‘font error: there is a problem with the font Regular and cannot be used to create a text entity’
Again, I am just starting with this so most likely missing something basic.
Thank you for your help