<?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 Betreff: What is the best way to restrict an integer parameter to even numbers? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/What-is-the-best-way-to-restrict-an-integer-parameter-to-even/m-p/678926#M8034</link>
    <description>&lt;P&gt;Fortunately that's possible and done easily:&lt;/P&gt;
&lt;DIV style="color: #3d3d3d; background-color: #fafafa; font-family: Menlo, Monaco, 'Courier New', monospace; font-weight: normal; font-size: 12px; line-height: 18px; white-space: pre;"&gt;
&lt;DIV&gt;&lt;SPAN&gt;values&lt;/SPAN&gt; &lt;SPAN&gt;"my_int"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;range&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;20&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt; &lt;SPAN&gt;step&lt;/SPAN&gt; &lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;2&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By using the "step" command you can choose start and step from there one.&lt;/P&gt;
&lt;P&gt;All done in Parameter script.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Oct 2025 13:46:22 GMT</pubDate>
    <dc:creator>runxel</dc:creator>
    <dc:date>2025-10-06T13:46:22Z</dc:date>
    <item>
      <title>What is the best way to restrict an integer parameter to even numbers?</title>
      <link>https://community.graphisoft.com/t5/GDL/What-is-the-best-way-to-restrict-an-integer-parameter-to-even/m-p/678925#M8033</link>
      <description>&lt;P&gt;I am trying to find a way to restrict user inputs for an integer parameter to only even numbers. What is the best way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context: I have an integer parameter set up that allows a user to set the number of lite divisions in a window. In the vertical direction, the lites are divided between two sashes, so the number must be even or it throws off other dimensions. I could use a values command to create a list of available inputs, but I would like to find another way to restrict inputs to only even numbers if possible.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 13:30:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/What-is-the-best-way-to-restrict-an-integer-parameter-to-even/m-p/678925#M8033</guid>
      <dc:creator>Reilly</dc:creator>
      <dc:date>2025-10-06T13:30:12Z</dc:date>
    </item>
    <item>
      <title>Betreff: What is the best way to restrict an integer parameter to even numbers?</title>
      <link>https://community.graphisoft.com/t5/GDL/What-is-the-best-way-to-restrict-an-integer-parameter-to-even/m-p/678926#M8034</link>
      <description>&lt;P&gt;Fortunately that's possible and done easily:&lt;/P&gt;
&lt;DIV style="color: #3d3d3d; background-color: #fafafa; font-family: Menlo, Monaco, 'Courier New', monospace; font-weight: normal; font-size: 12px; line-height: 18px; white-space: pre;"&gt;
&lt;DIV&gt;&lt;SPAN&gt;values&lt;/SPAN&gt; &lt;SPAN&gt;"my_int"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;range&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;20&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt; &lt;SPAN&gt;step&lt;/SPAN&gt; &lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;2&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By using the "step" command you can choose start and step from there one.&lt;/P&gt;
&lt;P&gt;All done in Parameter script.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 13:46:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/What-is-the-best-way-to-restrict-an-integer-parameter-to-even/m-p/678926#M8034</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2025-10-06T13:46:22Z</dc:date>
    </item>
    <item>
      <title>Betreff: What is the best way to restrict an integer parameter to even numbers?</title>
      <link>https://community.graphisoft.com/t5/GDL/What-is-the-best-way-to-restrict-an-integer-parameter-to-even/m-p/678929#M8035</link>
      <description>&lt;P&gt;I would offer a VALUES list with the values 2, 4, 6, 8, etc., as this is the clearest for the user.&lt;/P&gt;
&lt;P&gt;Something like this would also work:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;VALUES&lt;/STRONG&gt; ‘anz’ &lt;STRONG&gt;RANGE&lt;/STRONG&gt;[2, ] &lt;STRONG&gt;STEP&lt;/STRONG&gt; 2, 2&lt;/P&gt;
&lt;P&gt;Then odd values are rounded up to the next higher even value.&lt;/P&gt;
&lt;P&gt;You can do something similar with &lt;STRONG&gt;PARAMETERS&lt;/STRONG&gt; if you don't want the somewhat confusing limit indicator in the input field.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 13:52:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/What-is-the-best-way-to-restrict-an-integer-parameter-to-even/m-p/678929#M8035</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2025-10-06T13:52:56Z</dc:date>
    </item>
  </channel>
</rss>

