Returns or modifies the user text string of a dimension object. The user text is the string that gets printed when the dimension is defined. If it contains the token "<>", then the token is replaced with the measured value of the dimension, formatted according to the dimension style settings. Note, "<>" is the default user text string for linear dimensions.
rhinoscriptsyntax.DimensionUserText (object_id, usertext=None)
rhinoscript.dimension.DimensionUserText (object_id, usertext=None)
object_id |
Required. String or Guid. The object's identifier. |
usertext |
Optional. String. The new user text string value. To reset the use text string, use the string "<>". |
String |
If usertext is not specified, then the current user text string if successful. |
String |
If usertext is specified, then the previous user text string if successful. |
None |
On error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a dimension")
if rs.IsDimension(obj):
usertext = "<> " + chr(177) + str(rs.UnitAbsoluteTolerance())
rs.DimensionUserText( obj, usertext )