<?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 Conditional branching (again) - use of IFS in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577917#M5945</link>
    <description>&lt;P&gt;I really struggle with multiple conditions in GDL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The IFS command seems to be the simplest and does what I want but the AC27 GDL editor doesn't like it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm building a parametric manhole object, and need to set the size based on the depth and number of branches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The parameters are these:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If there are more than 3 branches in the manhole (from the user inputs) - set the manhole length to 1370&lt;/LI&gt;
&lt;LI&gt;If the manhole depth is greater than 900 (and there are fewer than 3 branches)&amp;nbsp;- set the manhole length to 1250&lt;/LI&gt;
&lt;LI&gt;If there are exactly 3 branches in the manhole (and the depth is greater than 900)- set the manhole length to 1030&lt;/LI&gt;
&lt;LI&gt;Otherwise (if depth is less than 900 and there are&amp;nbsp;fewer than 3 branches) - set the manhole length to 800&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would seem to do what I want according to the &amp;nbsp;user guide (&lt;A href="https://helpcenter.graphisoft.com/user-guide/88992/" target="_blank" rel="noopener"&gt;https://helpcenter.graphisoft.com/user-guide/88992/&lt;/A&gt;)&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;IFS &lt;/SPAN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t;STRONG&gt;Missing CALL keyword (not recommended)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;at line 56 in the Master script of file BG_Manhole_Rect_v0.1.gsm&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously I'm doing something wrong, I'm just not sure what. Any ideas?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Sep 2024 11:44:42 GMT</pubDate>
    <dc:creator>Jim Allen</dc:creator>
    <dc:date>2024-09-26T11:44:42Z</dc:date>
    <item>
      <title>Conditional branching (again) - use of IFS</title>
      <link>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577917#M5945</link>
      <description>&lt;P&gt;I really struggle with multiple conditions in GDL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The IFS command seems to be the simplest and does what I want but the AC27 GDL editor doesn't like it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm building a parametric manhole object, and need to set the size based on the depth and number of branches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The parameters are these:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If there are more than 3 branches in the manhole (from the user inputs) - set the manhole length to 1370&lt;/LI&gt;
&lt;LI&gt;If the manhole depth is greater than 900 (and there are fewer than 3 branches)&amp;nbsp;- set the manhole length to 1250&lt;/LI&gt;
&lt;LI&gt;If there are exactly 3 branches in the manhole (and the depth is greater than 900)- set the manhole length to 1030&lt;/LI&gt;
&lt;LI&gt;Otherwise (if depth is less than 900 and there are&amp;nbsp;fewer than 3 branches) - set the manhole length to 800&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would seem to do what I want according to the &amp;nbsp;user guide (&lt;A href="https://helpcenter.graphisoft.com/user-guide/88992/" target="_blank" rel="noopener"&gt;https://helpcenter.graphisoft.com/user-guide/88992/&lt;/A&gt;)&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;IFS &lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;numbranches&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; mhlength&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;1370&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;ZZYZX&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;900&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;mhlength&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;1250&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;numbranches&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;mhlength&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;1030&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;mhlength&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;800&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Yet I get this error when it is checked:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;&lt;STRONG&gt;Missing CALL keyword (not recommended)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;at line 56 in the Master script of file BG_Manhole_Rect_v0.1.gsm&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously I'm doing something wrong, I'm just not sure what. Any ideas?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:44:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577917#M5945</guid>
      <dc:creator>Jim Allen</dc:creator>
      <dc:date>2024-09-26T11:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional branching (again) - use of IFS</title>
      <link>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577919#M5946</link>
      <description>&lt;P&gt;Hey Jim, you're conflating GDL with Expressions here. So no wonder it does not work. What do you actually want to do?&lt;/P&gt;
&lt;P&gt;GDL does not support IFS.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:56:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577919#M5946</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2023-11-28T15:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional branching (again) - use of IFS</title>
      <link>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577920#M5947</link>
      <description>&lt;P&gt;&lt;A href="https://gdl.graphisoft.com/reference-guide/flow-control-statements" target="_self"&gt;scroll to IF&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:56:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577920#M5947</guid>
      <dc:creator>A_ Smith</dc:creator>
      <dc:date>2023-11-28T15:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional branching (again) - use of IFS</title>
      <link>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577926#M5948</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks makes sense - pity...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's all documented in the original post - I think.&lt;/P&gt;
&lt;P&gt;I'm going to have to turn that into horrible nested statements. I hate the GDL implementation of conditional branching ...grr...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a more positive note, I'm going to use your LocatorLX script as a template for the 2D labels, most of the scripting is done, so that will save a lot of time.&lt;/P&gt;
&lt;P&gt;I should then have some nice parametric manhole objects I can drop into a model use as connection points for drain runs, and schedule.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 16:06:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Conditional-branching-again-use-of-IFS/m-p/577926#M5948</guid>
      <dc:creator>Jim Allen</dc:creator>
      <dc:date>2023-11-28T16:06:33Z</dc:date>
    </item>
  </channel>
</rss>

