<?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: Multiple label styles with dynamically changing parameters + fill rendering priority in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589817#M6388</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/106459"&gt;@Chicken&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe you will need to put "drawindex 40" infront of the line2 script segment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jarrod&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 11:02:45 GMT</pubDate>
    <dc:creator>Jarrod Phillips</dc:creator>
    <dc:date>2024-02-26T11:02:45Z</dc:date>
    <item>
      <title>Multiple label styles with dynamically changing parameters + fill rendering priority</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589786#M6385</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am new to GDL programming and I have not been able to solve these two problems. Could you please help me?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. I would like to create a label that will have multiple preset styles. If the styles are selected, I want to dynamically override the parameters so that they also change in the settings. For example, Style 1 will have a green font color. When choosing a style, the color changes in the settings, but when I want to, the color can still be changed to something else in the settings.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="label_2.png" style="width: 180px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/53941iBC5299A95F6AE009/image-size/small?v=v2&amp;amp;px=200" role="button" title="label_2.png" alt="label_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is one example parameter I would like to change dynamically based on the style. (red changes to green)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;+ bonus question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; how would you create these style options? using a subroutine or something else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;I haven't figured out how to force the fill (POLY2_B, not transparent, just lighter color) to be in front of the line. For some reason the text is already in front of everything, but how can I control the priority of the other elements? Is there a way?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="label_1.png" style="width: 200px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/53942iCA55358780E60235/image-size/small?v=v2&amp;amp;px=200" role="button" title="label_1.png" alt="label_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the suggestions&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:14:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589786#M6385</guid>
      <dc:creator>Chicken</dc:creator>
      <dc:date>2024-09-26T11:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple label styles with dynamically changing parameters + fill rendering priority</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589788#M6386</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/106459"&gt;@Chicken&lt;/a&gt;, welcome to the world of GDL scripting.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In response to the second part of your first question, you can use the ‘values’ command to create options (there are more complex ways to do this however this should suffice). You will firstly need to create a new string parameter and then type the following in the parameter script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;values “parameterName”, “Option 1”, “Option 2”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your parameter should now have 2 options to choose from. Then you can use if/endif statements to do something if option 1 is selected or do something else if option 2 is selected. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if parameterName = “Option 1” then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; do something&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To answer your second question, you can use the ‘drawindex’ command to control the display order of 2d elements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jarrod&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 09:33:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589788#M6386</guid>
      <dc:creator>Jarrod Phillips</dc:creator>
      <dc:date>2024-02-26T09:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple label styles with dynamically changing parameters + fill rendering priority</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589796#M6387</link>
      <description>&lt;P&gt;Yes, I use the parameters to select the style and then call the subroutine according to the IF script. I&amp;nbsp;should add that for the text color example I am trying to use the archicad parameter AC_TextPen_1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if i'm using DRAWINDEX correctly, anyway I couldn't get it to work. LINE2 is before this script, so DRAWINDEX shouldn't affect it, right?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DRAWINDEX 50

	PEN			FramePen
	LINE_TYPE 	FrameType
	FILL 		FrameFill
	
	
	POLY2_B		2, _FrameFill,
				AC_LabelTextBgrPen, -1,
				Label_X, Label_Y, 900,
				_LabelFrameH, 360, 4001&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 09:46:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589796#M6387</guid>
      <dc:creator>Chicken</dc:creator>
      <dc:date>2024-02-26T09:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple label styles with dynamically changing parameters + fill rendering priority</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589817#M6388</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/106459"&gt;@Chicken&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe you will need to put "drawindex 40" infront of the line2 script segment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jarrod&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 11:02:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589817#M6388</guid>
      <dc:creator>Jarrod Phillips</dc:creator>
      <dc:date>2024-02-26T11:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple label styles with dynamically changing parameters + fill rendering priority</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589818#M6389</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DRAWINDEX 30

	PEN			FramePen
	LINE_TYPE 	FrameType
	FILL 		FrameFill
	
DRAWINDEX 50	
	POLY2_B		2, _FrameFill,
				AC_LabelTextBgrPen, -1,
				Label_X, Label_Y, 900,
				_LabelFrameH, 360, 4001&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 11:10:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-label-styles-with-dynamically-changing-parameters-fill/m-p/589818#M6389</guid>
      <dc:creator>Yves</dc:creator>
      <dc:date>2024-02-26T11:10:36Z</dc:date>
    </item>
  </channel>
</rss>

