<?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: Integers - maximum and minimum in Revit Architecture Forum</title>
    <link>https://forums.autodesk.com/t5/revit-architecture-forum/integers-maximum-and-minimum/m-p/12272885#M37838</link>
    <description>&lt;P&gt;I had similar formula that works with lengths but it should work integers as well. Check the screenshot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="syman2000_0-1695914746891.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1273001iD6D39D3E1993AC36/image-size/medium?v=v2&amp;amp;px=400" role="button" title="syman2000_0-1695914746891.png" alt="syman2000_0-1695914746891.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 15:26:09 GMT</pubDate>
    <dc:creator>syman2000</dc:creator>
    <dc:date>2023-09-28T15:26:09Z</dc:date>
    <item>
      <title>Integers - maximum and minimum</title>
      <link>https://forums.autodesk.com/t5/revit-architecture-forum/integers-maximum-and-minimum/m-p/12271670#M37836</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just wondering if it's possible to add a maximum and minimum to an integer. I am currently using numbers 1-3 for visibility parameters, and would like to cap it to those numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 03:43:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-architecture-forum/integers-maximum-and-minimum/m-p/12271670#M37836</guid>
      <dc:creator>phillipesfy_</dc:creator>
      <dc:date>2023-09-28T03:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Integers - maximum and minimum</title>
      <link>https://forums.autodesk.com/t5/revit-architecture-forum/integers-maximum-and-minimum/m-p/12271815#M37837</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13531952"&gt;@phillipesfy_&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to use a second parameter that will constrain the values of the first one. That second parameter is the one that you will use for your object while keeping the first one as a input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, let's say your input parameter is named VisibilityInput, then you would need another one that you could call VisibilityInputConstraint. Then VisibilityInputConstraint will be have a formula that would look like this :&lt;/P&gt;&lt;LI-CODE lang="general"&gt;if(VisibilityInput &amp;lt; 1, 1, if(VisibilityInput &amp;gt; 3, 3, VisibilityInput))&lt;/LI-CODE&gt;&lt;P&gt;And like that, VisilibtyInputConstraint will always be between 1 and 3 and you will be able to use it to have values that are constrained between the minimum and maximum you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would advise to have your minimum and maximum values as parameters as well so you do not have to hardcode them into the formula above.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;if(VisibilityInput &amp;lt; VISIBILITY_MINIMUM, VISIBILITY_MINIMUM, if(VisibilityInput &amp;gt; VISIBILITY_MAXIMUM, VISIBILITY_MAXIMUM, VisibilityInput))&lt;/LI-CODE&gt;&lt;P&gt;But that would also require you to have two additional parameters in your list so it's up to you and how many more parameters you're fine with.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 06:07:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-architecture-forum/integers-maximum-and-minimum/m-p/12271815#M37837</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2023-09-28T06:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Integers - maximum and minimum</title>
      <link>https://forums.autodesk.com/t5/revit-architecture-forum/integers-maximum-and-minimum/m-p/12272885#M37838</link>
      <description>&lt;P&gt;I had similar formula that works with lengths but it should work integers as well. Check the screenshot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="syman2000_0-1695914746891.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1273001iD6D39D3E1993AC36/image-size/medium?v=v2&amp;amp;px=400" role="button" title="syman2000_0-1695914746891.png" alt="syman2000_0-1695914746891.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 15:26:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-architecture-forum/integers-maximum-and-minimum/m-p/12272885#M37838</guid>
      <dc:creator>syman2000</dc:creator>
      <dc:date>2023-09-28T15:26:09Z</dc:date>
    </item>
  </channel>
</rss>

