TextElement
Canonical path: NemAll_Python_BasisElements.TextElement
Bases: BasisElement
, AllplanElement
Representation of text in Allplan
Methods:
-
GetDimensions
–Get the dimensions of the text
-
GetText
–Get the text string
-
GetTextPoints
–Get the list of text points composed as follows:
-
GetTextProperties
–Get the Text properties
-
SetText
–Set the text string
-
SetTextProperties
–Set the Text properties
-
__eq__
–Comparison operator
-
__init__
–Overloaded function. See individual overloads.
-
__repr__
–Convert to string
Attributes:
-
Text
(str
) –Representation of text in Allplan
-
TextProperties
(TextProperties
) –Get the Text properties
GetDimensions
GetDimensions(doc: DocumentAdapter) -> Vector2D
Get the dimensions of the text
Parameters:
-
doc
(DocumentAdapter
) –Document
Returns:
-
Vector2D
–Text dimensions
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:
-
doc
(DocumentAdapter
) –Document
-
refPnt
(Point2D
) –Reference point
Returns:
-
Point2DList
–Text points
GetTextProperties
GetTextProperties() -> TextProperties
SetTextProperties
SetTextProperties(textProp: TextProperties)
__eq__
__eq__(textEle: TextElement) -> bool
Comparison operator
Parameters:
-
textEle
(TextElement
) –Text element to compare
Returns:
-
bool
–Comparison state
__init__
overloaded
Initialize
__init__(
commonProp: CommonProperties,
textProp: TextProperties,
text: str,
textPnt: Point2D,
)
Constructor
Parameters:
-
commonProp
(CommonProperties
) –Common properties
-
textProp
(TextProperties
) –Text properties
-
text
(str
) –Text string
-
textPnt
(Point2D
) –Text point
__init__(element: TextElement)