<?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: Show minimum length of an object in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128554#M27853</link>
    <description>Another one:&lt;BR /&gt;
A = min (2", A)        ! Master Script &lt;BR /&gt;
parameters A = A    ! Parameter Script &lt;BR /&gt;
&lt;BR /&gt;
The problem with range values ... Fore sure, they tell you the limits, &lt;BR /&gt;
But in case of wrong value,  they just return to the minimum value. &lt;BR /&gt;
&lt;BR /&gt;
I find  more intuitive to fix the limits myself.&lt;BR /&gt;
A = min ( max (2", A), 10")            ! Master Script&lt;BR /&gt;
values "A" 2", 4", 6", 10", custom    ! Parameter Script&lt;BR /&gt;
parameters A = A                          ! Parameter Script &lt;BR /&gt;
&lt;BR /&gt;
"A" automatically update within the limits, from min to max,&lt;BR /&gt;
but locks on 2" for any value &amp;lt; 2", and locks on 10" for any value &amp;gt; 10"&lt;BR /&gt;
&lt;BR /&gt;
That's split hairs, i agree. Whatever method you choose, it's important to use one, for safety.&lt;BR /&gt;
Supose a typo error. About resolution, you type 3600 instead of 36 (fingers accident). &lt;BR /&gt;
The object will start infinite loops. At the end, you have to force AC to quit. Too bad.</description>
    <pubDate>Thu, 17 Jul 2008 20:14:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-07-17T20:14:43Z</dc:date>
    <item>
      <title>Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128548#M27847</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi Guys,&lt;BR /&gt;
&lt;BR /&gt;
I have an object that needs to be restricted to a minimum length. I used a statement in the 2D script(IF A &amp;lt; 2" THEN A = 2") that keeps the object in plan at 2" or more. The problem is that if you type anything less than that in the length box ("A" parameter), that dimension stays the same in the box even though the object itself stays at 2". I'd like the length parameter to revert to the minimum if anything less is typed in.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
&lt;BR /&gt;
Doug&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Jul 2008 22:27:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128548#M27847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-16T22:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128549#M27848</link>
      <description>You need to put that limiting aspect in the Parameters script and use an accompanying "PARAMETERS" command.&lt;BR /&gt;
&lt;BR /&gt;
Basically:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;IF A &amp;lt; 2" THEN A = 2"
PARAMETERS A = A
&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jul 2008 22:56:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128549#M27848</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2008-07-16T22:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128550#M27849</link>
      <description>Thanks Tom,&lt;BR /&gt;
&lt;BR /&gt;
That's perfect. I've never (obviously) used the Parameters command. I tried a search and the help files but it's tough when you don't know exactly what you are looking for. It's quite humbling as a novice scripter to have you're big head deflated with something so simple!! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
Thanks again,&lt;BR /&gt;
&lt;BR /&gt;
Doug</description>
      <pubDate>Wed, 16 Jul 2008 23:09:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128550#M27849</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-16T23:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128551#M27850</link>
      <description>For two years, I basically just wrote objects for half my day. It's amazing the things you learn when you have to, but are completely unknown otherwise.</description>
      <pubDate>Thu, 17 Jul 2008 00:33:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128551#M27850</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2008-07-17T00:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128552#M27851</link>
      <description>You can also accomplish the same thing with:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;VALUES "A" RANGE [2", ]&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
It's good to get to know both the PARAMETERS and VALUES functions. There's lots of utility in them.&lt;BR /&gt;
&lt;BR /&gt;
For example:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;VALUES "A" RANGE [2", ] STEP 2", 2"&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Does the above and limits A to 2" increments. &lt;BR /&gt;
&lt;BR /&gt;
You can also stack up the arguments as in:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;VALUES "A" RANGE [2", 12"] STEP 2", 2", RANGE [24", 48"] STEP 24", 3"&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
This will limit the values to 2" increments from 2" to 12" and 3" increments  between 24" and 48" (and allow no other values).&lt;BR /&gt;
&lt;BR /&gt;
Another useful form is:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;VALUES "n" 1, 2, 3, 4, 5, 6, 7, 8, 9, 10&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
It gives the user a pop-up list of predefined values to chose from.&lt;BR /&gt;
&lt;BR /&gt;
The GDL Reference is rather cryptic on this (and other) topics but worth a look to at least get some hints about what these functions can do.</description>
      <pubDate>Thu, 17 Jul 2008 15:50:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128552#M27851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-17T15:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128553#M27852</link>
      <description>Another plus of VALUES, as suggested by Matthew, is that you get an automatic tooltip like thingie so that the user doesn't wonder why the number they entered got changed to something else.&lt;BR /&gt;
&lt;BR /&gt;
Karl</description>
      <pubDate>Thu, 17 Jul 2008 16:04:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128553#M27852</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2008-07-17T16:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128554#M27853</link>
      <description>Another one:&lt;BR /&gt;
A = min (2", A)        ! Master Script &lt;BR /&gt;
parameters A = A    ! Parameter Script &lt;BR /&gt;
&lt;BR /&gt;
The problem with range values ... Fore sure, they tell you the limits, &lt;BR /&gt;
But in case of wrong value,  they just return to the minimum value. &lt;BR /&gt;
&lt;BR /&gt;
I find  more intuitive to fix the limits myself.&lt;BR /&gt;
A = min ( max (2", A), 10")            ! Master Script&lt;BR /&gt;
values "A" 2", 4", 6", 10", custom    ! Parameter Script&lt;BR /&gt;
parameters A = A                          ! Parameter Script &lt;BR /&gt;
&lt;BR /&gt;
"A" automatically update within the limits, from min to max,&lt;BR /&gt;
but locks on 2" for any value &amp;lt; 2", and locks on 10" for any value &amp;gt; 10"&lt;BR /&gt;
&lt;BR /&gt;
That's split hairs, i agree. Whatever method you choose, it's important to use one, for safety.&lt;BR /&gt;
Supose a typo error. About resolution, you type 3600 instead of 36 (fingers accident). &lt;BR /&gt;
The object will start infinite loops. At the end, you have to force AC to quit. Too bad.</description>
      <pubDate>Thu, 17 Jul 2008 20:14:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128554#M27853</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-17T20:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128555#M27854</link>
      <description>I forgot this one.&lt;BR /&gt;
&lt;BR /&gt;
Range values don't work into arrays.&lt;BR /&gt;
The parameters method allows a workaround.&lt;BR /&gt;
&lt;BR /&gt;
!!! --------- Master Script&lt;BR /&gt;
for k = 1 to nSeg-1 &lt;BR /&gt;
	if bStepRot then&lt;BR /&gt;
		for j = 0 to resT&lt;BR /&gt;
			if j = 0 then&lt;BR /&gt;
				if rotE&lt;K&gt; &amp;gt;= 0 and rotE&lt;K&gt; &amp;lt; stepAng*0.5 then rotE&lt;K&gt; = 0&lt;BR /&gt;
			else&lt;BR /&gt;
				if rotE&lt;K&gt; &amp;gt;= stepAng*((j-1)+0.5) and rotE&lt;K&gt; &amp;lt; stepAng*(j+0.5) then rotE&lt;K&gt; = stepAng*j&lt;BR /&gt;
			endif&lt;BR /&gt;
		next j&lt;BR /&gt;
	endif&lt;BR /&gt;
next k&lt;BR /&gt;
&lt;BR /&gt;
!!!-------- Parameter Script&lt;BR /&gt;
parameters rotE = rotE&lt;BR /&gt;
&lt;BR /&gt;
In this situation, you can move an angle by increment, into an array.&lt;/K&gt;&lt;/K&gt;&lt;/K&gt;&lt;/K&gt;&lt;/K&gt;&lt;/K&gt;</description>
      <pubDate>Thu, 17 Jul 2008 20:50:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128555#M27854</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-17T20:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128556#M27855</link>
      <description>Thanks Guys,&lt;BR /&gt;
&lt;BR /&gt;
I understand the "Values" function (thanks again Matthew)but I have to say Oliver, you have officially gone over my head with your last post! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;  I'll have to try to find the time to study it and figure it out.&lt;BR /&gt;
&lt;BR /&gt;
Doug</description>
      <pubDate>Fri, 18 Jul 2008 23:24:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128556#M27855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-18T23:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Show minimum length of an object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128557#M27856</link>
      <description>4thorns, sorry, the formula can be simplified.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;   &lt;BR /&gt;
&lt;BR /&gt;
for k = 1 to nSeg-1&lt;BR /&gt;
	for j = 1 to resT&lt;BR /&gt;
		if rotE&lt;K&gt; &amp;gt;= stepAng*((j-1)+0.5) and rotE&lt;K&gt; &amp;lt; stepAng*(j+0.5) then rotE&lt;K&gt; = stepAng*j &lt;BR /&gt;
	next j&lt;BR /&gt;
next k&lt;BR /&gt;
&lt;BR /&gt;
Joke aside, this thread just demonstrates AC flexibility. &lt;BR /&gt;
GDL or not, threre are many ways to achieve what you want. &lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Olivier&lt;/K&gt;&lt;/K&gt;&lt;/K&gt;</description>
      <pubDate>Sat, 19 Jul 2008 19:31:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Show-minimum-length-of-an-object/m-p/128557#M27856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-19T19:31:26Z</dc:date>
    </item>
  </channel>
</rss>

