<?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: Custom Number of values, DIM? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182371#M13166</link>
    <description>Thanks, but do I need to use an array to choose from choices of text in a parameter? As this is ideally what Im after.&lt;BR /&gt;
Can range only control numerical input?</description>
    <pubDate>Fri, 09 Aug 2013 11:18:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-09T11:18:41Z</dc:date>
    <item>
      <title>Custom Number of values, DIM?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182369#M13164</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
Hoping someone can help me with the DIM command.&lt;BR /&gt;
Below is a script I am using to work out the height of the risers in my stairs.&lt;BR /&gt;
The maximum riser height I want is 190mm and the minimum is 115mm (excuse my metric) &lt;BR /&gt;
&lt;BR /&gt;
smax1 = stairheight/0.190&lt;BR /&gt;
smin1 = stairheight/0.115&lt;BR /&gt;
&lt;BR /&gt;
smax = int(smax1)+1&lt;BR /&gt;
smin = int(smin1)&lt;BR /&gt;
&lt;BR /&gt;
ropt1 = stairheight/smax&lt;BR /&gt;
ropt2 = stairheight/(smax+1)&lt;BR /&gt;
ropt3 = stairheight/(smax+2)&lt;BR /&gt;
ropt4 = stairheight/(smax+3)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I am then using these 'ropt' values in my parameter script. Although on smaller stairs the ropt4 may be smaller than the minimum size allowed&lt;BR /&gt;
&lt;BR /&gt;
Now, I know there is a way that I can only display the values between these numbers but I am unsure how. Is there a basic DIM command someone can suggest. Sorry if I am being rude asking such an open question.&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Aug 2013 05:00:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182369#M13164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-09T05:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Number of values, DIM?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182370#M13165</link>
      <description>The DIM command is for the declaration of an Array.&lt;BR /&gt;
You need to use VALUES with RANGE, e.g.&lt;BR /&gt;
VALUES hgth RANGE[0.11, 0.19]</description>
      <pubDate>Fri, 09 Aug 2013 07:50:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182370#M13165</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2013-08-09T07:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Number of values, DIM?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182371#M13166</link>
      <description>Thanks, but do I need to use an array to choose from choices of text in a parameter? As this is ideally what Im after.&lt;BR /&gt;
Can range only control numerical input?</description>
      <pubDate>Fri, 09 Aug 2013 11:18:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182371#M13166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-09T11:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Number of values, DIM?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182372#M13167</link>
      <description>RANGE can only act with numerical values.&lt;BR /&gt;
But you can define an Array dynamically by the script,&lt;BR /&gt;
which can build the base of a VALUS command.&lt;BR /&gt;
&lt;BR /&gt;
Example:&lt;BR /&gt;
!Master-Script&lt;BR /&gt;
DIM water[]&lt;BR /&gt;
IF condition1 THEN&lt;BR /&gt;
water[1] = "blue"&lt;BR /&gt;
water[2] = "yellow"&lt;BR /&gt;
water[3] = "green"&lt;BR /&gt;
ENDIF&lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
!Parameter-Script&lt;BR /&gt;
VALUES param1 water</description>
      <pubDate>Fri, 09 Aug 2013 16:44:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182372#M13167</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2013-08-09T16:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Number of values, DIM?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182373#M13168</link>
      <description>Thankyou Joachim,&lt;BR /&gt;
I have got something working. I probably should of been neater with a flow control statement, but work ok. (I actually have 10 possible parameters, but have shortened it for here)&lt;BR /&gt;
The script works for Australian standards,&lt;BR /&gt;
Maximum Riser Height = 190mm&lt;BR /&gt;
Minimum Riser Height = 115mm&lt;BR /&gt;
Maximum 2 x Risers + Going = 700mm&lt;BR /&gt;
Minimum 2 x Risers + Going = 550mm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
!Master Script&lt;BR /&gt;
&lt;BR /&gt;
smax1 = stairheight/0.190 &lt;BR /&gt;
smin1 = stairheight/0.115 &lt;BR /&gt;
&lt;BR /&gt;
smax = int(smax1)+1 &lt;BR /&gt;
smin = int(smin1) &lt;BR /&gt;
&lt;BR /&gt;
ropt1 = stairheight/smax &lt;BR /&gt;
ropt2 = stairheight/(smax+1) &lt;BR /&gt;
ropt3 = stairheight/(smax+2) &lt;BR /&gt;
ropt4 = stairheight/(smax+3) &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
DIM risers[]&lt;BR /&gt;
ii=0&lt;BR /&gt;
if ropt1 &amp;gt; 0.115 and (2*ropt1)+going&amp;gt;0.550 and (2*ropt1)+going&amp;lt;0.7 then&lt;BR /&gt;
ii=ii+1&lt;BR /&gt;
risers[ii]=str("%0mm",ropt1)&lt;BR /&gt;
endif&lt;BR /&gt;
if ropt2 &amp;gt; 0.115 and (2*ropt2)+going&amp;gt;0.550 and (2*ropt2)+going&amp;lt;0.7 then&lt;BR /&gt;
ii=ii+1&lt;BR /&gt;
risers[ii]=str("%0mm",ropt2)&lt;BR /&gt;
endif&lt;BR /&gt;
if ropt3 &amp;gt; 0.115 and (2*ropt3)+going&amp;gt;0.550 and (2*ropt3)+going&amp;lt;0.7 then&lt;BR /&gt;
ii=ii+1&lt;BR /&gt;
risers[ii]=str("%0mm",ropt3)&lt;BR /&gt;
endif&lt;BR /&gt;
if ropt4 &amp;gt; 0.115 and (2*ropt4)+going&amp;gt;0.550 and (2*ropt4)+going&amp;lt;0.7 then&lt;BR /&gt;
ii=ii+1&lt;BR /&gt;
risers[ii]=str("%0mm",ropt4)&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
!Parameter Script&lt;BR /&gt;
values "riserheight" risers</description>
      <pubDate>Mon, 12 Aug 2013 00:15:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Custom-Number-of-values-DIM/m-p/182373#M13168</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-12T00:15:17Z</dc:date>
    </item>
  </channel>
</rss>

