<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic modify Label text background pen for AC Property value in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/modify-Label-text-background-pen-for-AC-Property-value/m-p/236702#M3547</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;In expressing the element ID by modifying the existing Label GDL library&lt;BR /&gt;
&amp;nbsp;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.&lt;BR /&gt;
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?&lt;BR /&gt;
&lt;BR /&gt;
! ================================================== ============================&lt;BR /&gt;
! Get the value (s) of the stored property&lt;BR /&gt;
! ================================================== ============================&lt;BR /&gt;
&lt;BR /&gt;
_valueString = ""&lt;BR /&gt;
dim _propertyValues ​​[] []&lt;BR /&gt;
_dim1 = 0&lt;BR /&gt;
_dim2 = 0&lt;BR /&gt;
&lt;BR /&gt;
n = REQUEST ("Property_Value_Of_Parent", "PC Zone", _type, _dim1, _dim2, _propertyValues)&lt;BR /&gt;
&lt;BR /&gt;
if n then&lt;BR /&gt;
! change zeros to ones - it is easier to handle all possible arrays in a double loop&lt;BR /&gt;
if _dim1 = 0 then _dim1 = 1&lt;BR /&gt;
if _dim2 = 0 then _dim2 = 1&lt;BR /&gt;
&lt;BR /&gt;
for i = 1 to _dim1&lt;BR /&gt;
for j = 1 to _dim2&lt;BR /&gt;
if (i + j)&amp;gt; 2 then _valueString = _valueString + ";"&lt;BR /&gt;
&lt;BR /&gt;
if _type = 4 then! Type is string - no conversion needed&lt;BR /&gt;
_stringPropValue = _propertyValues ​​&lt;J&gt; &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;BR /&gt;
else! bool, real, integer types - conversion needed to string&lt;BR /&gt;
_valueToConvert = _propertyValues ​​&lt;J&gt; &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;BR /&gt;
gosub "convertToString"&lt;BR /&gt;
endif&lt;BR /&gt;
_valueString = _valueString + _stringPropValue&lt;BR /&gt;
next j&lt;BR /&gt;
next i&lt;BR /&gt;
endif&lt;BR /&gt;
if _valueString = "Zone 01" then&lt;BR /&gt;
LABEL_TEXT_BG_PEN = 3&lt;BR /&gt;
endif&lt;/J&gt;&lt;/J&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 23 Aug 2018 01:48:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-23T01:48:45Z</dc:date>
    <item>
      <title>modify Label text background pen for AC Property value</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/modify-Label-text-background-pen-for-AC-Property-value/m-p/236702#M3547</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;In expressing the element ID by modifying the existing Label GDL library&lt;BR /&gt;
&amp;nbsp;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.&lt;BR /&gt;
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?&lt;BR /&gt;
&lt;BR /&gt;
! ================================================== ============================&lt;BR /&gt;
! Get the value (s) of the stored property&lt;BR /&gt;
! ================================================== ============================&lt;BR /&gt;
&lt;BR /&gt;
_valueString = ""&lt;BR /&gt;
dim _propertyValues ​​[] []&lt;BR /&gt;
_dim1 = 0&lt;BR /&gt;
_dim2 = 0&lt;BR /&gt;
&lt;BR /&gt;
n = REQUEST ("Property_Value_Of_Parent", "PC Zone", _type, _dim1, _dim2, _propertyValues)&lt;BR /&gt;
&lt;BR /&gt;
if n then&lt;BR /&gt;
! change zeros to ones - it is easier to handle all possible arrays in a double loop&lt;BR /&gt;
if _dim1 = 0 then _dim1 = 1&lt;BR /&gt;
if _dim2 = 0 then _dim2 = 1&lt;BR /&gt;
&lt;BR /&gt;
for i = 1 to _dim1&lt;BR /&gt;
for j = 1 to _dim2&lt;BR /&gt;
if (i + j)&amp;gt; 2 then _valueString = _valueString + ";"&lt;BR /&gt;
&lt;BR /&gt;
if _type = 4 then! Type is string - no conversion needed&lt;BR /&gt;
_stringPropValue = _propertyValues ​​&lt;J&gt; &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;BR /&gt;
else! bool, real, integer types - conversion needed to string&lt;BR /&gt;
_valueToConvert = _propertyValues ​​&lt;J&gt; &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;BR /&gt;
gosub "convertToString"&lt;BR /&gt;
endif&lt;BR /&gt;
_valueString = _valueString + _stringPropValue&lt;BR /&gt;
next j&lt;BR /&gt;
next i&lt;BR /&gt;
endif&lt;BR /&gt;
if _valueString = "Zone 01" then&lt;BR /&gt;
LABEL_TEXT_BG_PEN = 3&lt;BR /&gt;
endif&lt;/J&gt;&lt;/J&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 Aug 2018 01:48:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/modify-Label-text-background-pen-for-AC-Property-value/m-p/236702#M3547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-23T01:48:45Z</dc:date>
    </item>
  </channel>
</rss>

