DimensionUserText

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.

Syntax

rhinoscriptsyntax.DimensionUserText (object_id, usertext=None)

rhinoscript.dimension.DimensionUserText (object_id, usertext=None)

Parameters

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 "<>".

Returns

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.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a dimension")

if rs.IsDimension(obj):

    usertext =  "<> " + chr(177) + str(rs.UnitAbsoluteTolerance())

    rs.DimensionUserText( obj, usertext )

Also See

DimensionText

DimensionValue

IsDimension