<?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 Re: Labeling a Hard-coded Property in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288283#M3501</link>
    <description>&lt;BLOCKQUOTE&gt;Podolsky wrote:&lt;BR /&gt;
This is not a problem. The code I published above get property value by name. Just using three steps.
&lt;/BLOCKQUOTE&gt;

Yes, you are right. This makes the GUID juggling much easier. &lt;BR /&gt;
The code didn't run at first, but I took a second look and will put the code with the small missing piece here:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;myPropToReq = "String of the Property Name"

dim parentProperties[]
r = request("Properties_Of_Parent", "", parentProperties)

if r then
	propertyID = ""
	for i = 4 to vardim1(parentProperties) step 4
		if parentProperties&lt;I&gt; = myPropToReq then
			propertyID = parentProperties[i-3]
		endif
	next i
	propertyValues = ""
	r = request("Property_Value_Of_Parent", propertyID, type, dim1, dim2, propertyValues)
endif

text2 0, 0, propertyValues
&lt;/I&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Jul 2021 20:20:55 GMT</pubDate>
    <dc:creator>runxel</dc:creator>
    <dc:date>2021-07-28T20:20:55Z</dc:date>
    <item>
      <title>Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288275#M3493</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I would like to have a simple label which calls out a specific hard-coded property. Not a general properties label. For example, we have a property under General called Remarks. Seems like this should be the code, but it does not work:&lt;BR /&gt;
&lt;PRE&gt;DIM _propertyValues[][]
rrr = REQUEST("Property_Value_Of_Parent", "Remarks", type, dim1, dim2, _propertyValues)
_str = 'blank' ! default
IF rrr &amp;gt; 0 THEN
	_str = _propertyValues[1][1]
ENDIF

TEXT2 0, 0, _str&lt;/PRE&gt;
This gives the default text, showing the request did not work.&lt;BR /&gt;&lt;BR /&gt;What I am I missing?&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 06:57:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288275#M3493</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2021-09-14T06:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288276#M3494</link>
      <description>I haven't tested this, but you are simply retrieving the value of a property.&lt;BR /&gt;
So there should be no need to declare a multidimensional array for it - it has one value and that is all you need.&lt;BR /&gt;
&lt;BR /&gt;
Maybe try this.&lt;BR /&gt;

&lt;PRE&gt;rrr = REQUEST("Property_Value_Of_Parent", "Remarks", type, dim1, dim2, _propertyValues)
_str = 'blank' ! default
IF rrr &amp;gt; 0 THEN
	_str = _propertyValues
ENDIF

TEXT2 0, 0, _str&lt;/PRE&gt;

&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 28 Jul 2021 01:26:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288276#M3494</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2021-07-28T01:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288277#M3495</link>
      <description>First of all:&lt;BR /&gt;
Why no autotext label? With a favorite this just works fine.&lt;BR /&gt;
&lt;BR /&gt;
The longer story:&lt;BR /&gt;
The "ID" in the request is &lt;B&gt;NOT&lt;/B&gt; the name of the property! But instead the GUID.&lt;BR /&gt;
&lt;BR /&gt;
Two ways:&lt;BR /&gt;
You need to program the label so that you can choose in the UI which of the properties should be requested.&lt;BR /&gt;
There is a special new UI command for that.&lt;BR /&gt;
&lt;BR /&gt;
Or:&lt;BR /&gt;
You use the text tool, write the property as autotext into it, save that as an object and open it.&lt;BR /&gt;
Inside you will find a PARAGRPAH with a string written that looks like this:&lt;BR /&gt;
"&amp;lt;PROPERTY-9E10C048-4861-5A48-B07A-B2E9BE4DBC9C&amp;gt;"&lt;BR /&gt;
That is the autotext string.&lt;BR /&gt;
But we need the GUID to have it requested. For this you only keep the part with the random alphanumerics and put it inside curly braces, like this:&lt;BR /&gt;
"{9E10C048-4861-5A48-B07A-B2E9BE4DBC9C}"&lt;BR /&gt;
&lt;BR /&gt;
This is the ID you need for the request.&lt;BR /&gt;
Happy coding! &lt;EMOJI seq="1f44b" tseq="1f44b"&gt;&lt;/EMOJI&gt;</description>
      <pubDate>Wed, 28 Jul 2021 11:21:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288277#M3495</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-07-28T11:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288278#M3496</link>
      <description>DIM parentProperties[]&lt;BR /&gt;
r=REQUEST (‘Properties_Of_Parent’, ‘’, parentProperties)&lt;BR /&gt;
&lt;BR /&gt;
IF r THEN&lt;BR /&gt;
propertyID=‘’&lt;BR /&gt;
FOR i = 4 TO VARDIM1(parentProperties) STEP 4&lt;BR /&gt;
IF parentProperties&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt; = yourPropertyName THEN propertyID = parentProperties[i-3]&lt;BR /&gt;
NEXT i &lt;BR /&gt;
propertyValues=‘’&lt;BR /&gt;
r=REQUEST (‘Property_Value_Of_Parent’, propertyID, type, dim1, dim2, propertyValues)&lt;BR /&gt;
ENDIF</description>
      <pubDate>Wed, 28 Jul 2021 13:24:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288278#M3496</guid>
      <dc:creator>Podolsky</dc:creator>
      <dc:date>2021-07-28T13:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288279#M3497</link>
      <description>Happy copy-pasting</description>
      <pubDate>Wed, 28 Jul 2021 13:25:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288279#M3497</guid>
      <dc:creator>Podolsky</dc:creator>
      <dc:date>2021-07-28T13:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288280#M3498</link>
      <description>Thank you, I thought it might be an GUID-decryption thing.&lt;BR /&gt;
&lt;BR /&gt;
Symbol labels need properties too  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;</description>
      <pubDate>Wed, 28 Jul 2021 14:45:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288280#M3498</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2021-07-28T14:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288281#M3499</link>
      <description>&lt;BLOCKQUOTE&gt;James wrote:&lt;BR /&gt;
Thank you, I thought it might be an GUID-decryption thing.&lt;BR /&gt;
&lt;BR /&gt;
Symbol labels need properties too  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;
&lt;/BLOCKQUOTE&gt;

You're welcome, James!&lt;BR /&gt;
True, as soon there are dynamic symbols involved you have to resort to GDL.&lt;BR /&gt;
&lt;BR /&gt;
It's a bit sad we have to use this workaround to get to the GUID. I am not aware of a simpler method.&lt;BR /&gt;
The XML export of a property &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;does not hold&lt;E&gt;&lt;/E&gt; its GUID. It seems that this will be created at import time.&lt;BR /&gt;
So in other news: Be aware when you go to a new file which is not based on your template. The GUID will not be the same, so the GDL label with its hardcoded GUID will stop working.&lt;BR /&gt;
So in the end it might be easier for maintenance to have a selection with UI_CUSTOM_POPUP_INFIELD somewhere in the label.</description>
      <pubDate>Wed, 28 Jul 2021 17:57:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288281#M3499</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-07-28T17:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288282#M3500</link>
      <description>&lt;BLOCKQUOTE&gt;runxel wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;James wrote:&lt;BR /&gt;
Thank you, I thought it might be an GUID-decryption thing.&lt;BR /&gt;
&lt;BR /&gt;
Symbol labels need properties too  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;
&lt;/BLOCKQUOTE&gt;

You're welcome, James!&lt;BR /&gt;
True, as soon there are dynamic symbols involved you have to resort to GDL.&lt;BR /&gt;
&lt;BR /&gt;
It's a bit sad we have to use this workaround to get to the GUID. I am not aware of a simpler method.&lt;BR /&gt;
The XML export of a property &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;does not hold&lt;E&gt;&lt;/E&gt; its GUID. It seems that this will be created at import time.&lt;BR /&gt;
So in other news: Be aware when you go to a new file which is not based on your template. The GUID will not be the same, so the GDL label with its hardcoded GUID will stop working.&lt;BR /&gt;
So in the end it might be easier for maintenance to have a selection with UI_CUSTOM_POPUP_INFIELD somewhere in the label.
&lt;/BLOCKQUOTE&gt;

This is not a problem. The code I published above get property value by name. Just using three steps.</description>
      <pubDate>Wed, 28 Jul 2021 19:06:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288282#M3500</guid>
      <dc:creator>Podolsky</dc:creator>
      <dc:date>2021-07-28T19:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288283#M3501</link>
      <description>&lt;BLOCKQUOTE&gt;Podolsky wrote:&lt;BR /&gt;
This is not a problem. The code I published above get property value by name. Just using three steps.
&lt;/BLOCKQUOTE&gt;

Yes, you are right. This makes the GUID juggling much easier. &lt;BR /&gt;
The code didn't run at first, but I took a second look and will put the code with the small missing piece here:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;myPropToReq = "String of the Property Name"

dim parentProperties[]
r = request("Properties_Of_Parent", "", parentProperties)

if r then
	propertyID = ""
	for i = 4 to vardim1(parentProperties) step 4
		if parentProperties&lt;I&gt; = myPropToReq then
			propertyID = parentProperties[i-3]
		endif
	next i
	propertyValues = ""
	r = request("Property_Value_Of_Parent", propertyID, type, dim1, dim2, propertyValues)
endif

text2 0, 0, propertyValues
&lt;/I&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Jul 2021 20:20:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288283#M3501</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-07-28T20:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288284#M3502</link>
      <description>&lt;BLOCKQUOTE&gt;runxel wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;Podolsky wrote:&lt;BR /&gt;
This is not a problem. The code I published above get property value by name. Just using three steps.
&lt;/BLOCKQUOTE&gt;

Yes, you are right. This makes the GUID juggling much easier. &lt;BR /&gt;
The code didn't run at first, but I took a second look and will put the code with the small missing piece here:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;myPropToReq = "String of the Property Name"

dim parentProperties[]
r = request("Properties_Of_Parent", "", parentProperties)

if r then
	propertyID = ""
	for i = 4 to vardim1(parentProperties) step 4
		if parentProperties&lt;I&gt; = myPropToReq then
			propertyID = parentProperties[i-3]
		endif
	next i
	propertyValues = ""
	r = request("Property_Value_Of_Parent", propertyID, type, dim1, dim2, propertyValues)
endif

text2 0, 0, propertyValues
&lt;/I&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;

Endif not needed before next i</description>
      <pubDate>Wed, 28 Jul 2021 20:24:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288284#M3502</guid>
      <dc:creator>Podolsky</dc:creator>
      <dc:date>2021-07-28T20:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling a Hard-coded Property</title>
      <link>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288285#M3503</link>
      <description>&lt;BLOCKQUOTE&gt;Podolsky wrote:&lt;BR /&gt;
&lt;BR /&gt;
Endif not needed before next i
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
True. As long you like oneliner IFs.&lt;BR /&gt;
I don't.&lt;BR /&gt;
&lt;BR /&gt;
But that was not the missing piece anyway &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 28 Jul 2021 20:25:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Labeling-a-Hard-coded-Property/m-p/288285#M3503</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-07-28T20:25:55Z</dc:date>
    </item>
  </channel>
</rss>

