DimStyleTextAlignment

Returns or changes the text alignment mode of a dimension style.

Syntax

rhinoscriptsyntax.DimStyleTextAlignment (dimstyle, alignment=None)

rhinoscript.dimension.DimStyleTextAlignment (dimstyle, alignment=None)

Parameters

dimstyle

Required.  String.  The name of an existing dimension style.

alignment

Optional.  Number.  The new text alignment.  If omitted, the current text alignment is returned.  The text alignment values are as follows:

Value

Description

0

Normal (same as 2)

1

Horizontal to view

2

Above the dimension line

3

In the dimension line

Returns

Number

If alignment is not specified, the current text alignment mode  if successful.

Number

If alignment is specified, the previous text alignment mode if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

dimstyle = rs.CurrentDimStyle()

alignment = rs.DimStyleTextAlignment(dimstyle)

if alignment!=2: rs.DimStyleTextAlignment( dimstyle, 2 )

Also See

DimStyleAnglePrecision

DimStyleArrowSize

DimStyleExtension

DimStyleFont

DimStyleLinearPrecision

DimStyleNumberFormat

DimStyleOffset

DimStyleTextHeight