Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

modify Label text background pen for AC Property value

Anonymous
Not applicable
In expressing the element ID by modifying the existing Label GDL library
 I want to create a GDL library that checks the value of a specific property and automatically sets the background color of the label if it has a certain value.
For example, if you select General Label and set the following name, turn off all values ​​other than the element id, and only the element id is selected, the attribute "PC Zone" is set to "Zone 01" Do not. What is the problem?

! ================================================== ============================
! Get the value (s) of the stored property
! ================================================== ============================

_valueString = ""
dim _propertyValues ​​[] []
_dim1 = 0
_dim2 = 0

n = REQUEST ("Property_Value_Of_Parent", "PC Zone", _type, _dim1, _dim2, _propertyValues)

if n then
! change zeros to ones - it is easier to handle all possible arrays in a double loop
if _dim1 = 0 then _dim1 = 1
if _dim2 = 0 then _dim2 = 1

for i = 1 to _dim1
for j = 1 to _dim2
if (i + j)> 2 then _valueString = _valueString + ";"

if _type = 4 then! Type is string - no conversion needed
_stringPropValue = _propertyValues ​​
else! bool, real, integer types - conversion needed to string
_valueToConvert = _propertyValues ​​
gosub "convertToString"
endif
_valueString = _valueString + _stringPropValue
next j
next i
endif
if _valueString = "Zone 01" then
LABEL_TEXT_BG_PEN = 3
endif
0 REPLIES 0