Rhino.DimensionText Rhino.FirstObject will not return a string.
Can you provide a small, run-able sample that doesn’t work for you?
Just run this script in the attached file. Note I turned off Rhino.Redraw right after the dim is plopped into comment so Rhino.DimensionText fails. It does here.
Thanks, I’ve logged the issue.
How hard is it to fix in R6? I mean why would I even report it if I knew this wouldn’t be fixed in R6?..
Sorry I missed this. I’ve back-ported the fix referenced above. Unfortunately SR16 went out this morning. This fix will appear on the SR17 RC next week.
import rhinoscriptsyntax as rs rs.EnableRedraw(False) dim = rs.AddLinearDimension(rs.WorldXYPlane(), (0, 0, 0), (10, 0, 0), (0, 5, 0)) print "---\n" + rs.DimensionText(dim) + "\n---" rs.EnableRedraw(True) print "---\n" + rs.DimensionText(dim) + "\n---"
We have 2 scripts that suffer from it… R5 was completely fine.
I’ve logged the issue.