Skip to content

Label Text Util

Class full path: Utils.LabelTextUtil.LabelTextUtil

Implementation of the utility for the label text creation

Functions

__init__()

initialize

add_attribute(doc, attribute_id, value='')

add an attribute to the label text

Parameters:

Name Type Description Default
doc DocumentAdapter

document of the Allplan drawing files

required
attribute_id int

attribute ID

required
value Any

value

''

add_parameter(build_ele, parameter_name)

add a parameter to the label text

Parameters:

Name Type Description Default
build_ele BuildingElement

building element with the parameter properties

required
parameter_name str

parameter name

required

add_parameter_name(parameter_name, value)

add a parameter name and value to the label text

Parameters:

Name Type Description Default
parameter_name str

parameter name

required
value Any

value

required

create_label_default_text()

create the text

Returns:

Type Description
str

default label text

create_label_text()

create the label text

Returns:

Type Description
str

label text

set_dimension_unit(dimension_unit)

set the dimension

Parameters:

Name Type Description Default
dimension_unit LabelTextDimensionUnit

dimension unit

required

set_dimension_unit_by_value_type(value_type)

set the dimension unit by the value type

Parameters:

Name Type Description Default
value_type ParameterPropertyValueType

Value type

required

set_format(text_format, digits, decimals=0)

set the format of the label text

Parameters:

Name Type Description Default
text_format LabelTextFormat

text format

required
digits int

digits

required
decimals int

decimals

0

set_format_by_value_type(value_type)

set the format by the value type

Parameters:

Name Type Description Default
value_type ParameterPropertyValueType

Value type

required

set_pre_text(pre_text)

set the pre text

Parameters:

Name Type Description Default
pre_text str

prefix text

required

set_text_frame(text_frame)

set the text frame of the label

Parameters:

Name Type Description Default
text_frame LabelTextFrame

text frame

required