Skip to content

TextElement

Canonical path: NemAll_Python_BasisElements.TextElement

Bases: BasisElement, AllplanElement

Representation of text in Allplan

Methods:

Attributes:

Text property writable

Text: str

Get the text string

TextProperties property writable

TextProperties: TextProperties

Get the Text properties

GetDimensions

GetDimensions(doc: DocumentAdapter) -> Vector2D

Get the dimensions of the text

Parameters:

Returns:

GetText

GetText() -> str

Get the text string

Returns:

  • str

    Text string

GetTextPoints

GetTextPoints(doc: DocumentAdapter, refPnt: Point2D) -> Point2DList

Get the list of text points composed as follows:

  • 0: Bottom left point
  • 1: Bottom right point
  • 2: Top right point
  • 3: Top left point
  • 4: Middle bottom point
  • 5: Middle right point
  • 6: Middle top point
  • 7: Middle left point

Parameters:

Returns:

GetTextProperties

GetTextProperties() -> TextProperties

Get the Text properties

Returns:

SetText

SetText(text: str)

Set the text string

Parameters:

  • text (str) –

    Text string

SetTextProperties

SetTextProperties(textProp: TextProperties)

Set the Text properties

Parameters:

__eq__

__eq__(textEle: TextElement) -> bool

Comparison operator

Parameters:

Returns:

  • bool

    Comparison state

__init__ overloaded

__init__()

Initialize

__init__(
    commonProp: CommonProperties,
    textProp: TextProperties,
    text: str,
    textPnt: Point2D,
)

Constructor

Parameters:

__init__(element: TextElement)

Copy constructor

Parameters:

__repr__

__repr__() -> str

Convert to string