<?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: Change of parameter under the set list and ... in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21692#M34104</link>
    <description>Try this:&lt;BR /&gt;
&lt;BR /&gt;
IF B&amp;gt;=0.008 then lang = 0.008 + INT((B-0.008)/0.002+0.0019)*0.002&lt;BR /&gt;
&lt;BR /&gt;
I thought indeed, that you want to round down, not up. You need to be the smallest value below the next step.&lt;BR /&gt;
&lt;BR /&gt;
What is "the standard of GOST"?</description>
    <pubDate>Wed, 05 Jul 2006 11:20:51 GMT</pubDate>
    <dc:creator>Frank Beister</dc:creator>
    <dc:date>2006-07-05T11:20:51Z</dc:date>
    <item>
      <title>Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21686#M34098</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hello, experts!&lt;BR /&gt;
Help me solve a problem(task):&lt;BR /&gt;
&lt;BR /&gt;
The parameter "B" can have any value.&lt;BR /&gt;
The parameter "D" should accept the nearest value from the list greater or equal "B".&lt;BR /&gt;
Example of the list:&lt;BR /&gt;
RANGE[8, 20]STEP 2,&lt;BR /&gt;
25, 30, 35,&lt;BR /&gt;
RANGE[40, 130]STEP 5&lt;BR /&gt;
&lt;BR /&gt;
That is, if "B" = 27, then "D" = 30.&lt;BR /&gt;
If "B" = 40, then "D" = 40.&lt;BR /&gt;
If "B" = 41, then "D" = 45.&lt;BR /&gt;
&lt;BR /&gt;
How it to make? And how to make the list?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Jul 2006 11:18:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21686#M34098</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-04T11:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21687#M34099</link>
      <description>Why to use a second parameter "D"?&lt;BR /&gt;
&lt;BR /&gt;
Can you post the whole script, you want to use? Or describe exactly, why you want to use two parameters?&lt;BR /&gt;
&lt;BR /&gt;
Which AC you are working with?</description>
      <pubDate>Tue, 04 Jul 2006 11:27:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21687#M34099</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-07-04T11:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21688#M34100</link>
      <description>Hello, F. Beister.&lt;BR /&gt;
I try to alter a library part "Schraube" under other standard. "Schraube" is on &lt;A href="http://www.opengdl.org" target="_blank"&gt;www.opengdl.org&lt;/A&gt;. It, apparently, your site. In picture are shown the parameters. In an original variant the step of parameter "D" makes 5 mm. I want to make so that "D" changed under the established list. It is not necessary to consider a library part. It is better to consider the simplified variant. The principle which can be applied in other parts is important.&lt;BR /&gt;
&lt;BR /&gt;
I work in ÀÑ7.&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/9367i28C85A5DF2718AB1/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Schraube.gif" title="Schraube.gif" /&gt;</description>
      <pubDate>Tue, 04 Jul 2006 14:50:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21688#M34100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-04T14:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21689#M34101</link>
      <description>In the first message I have allowed discrepancy in the list. Here I give more exact list.&lt;BR /&gt;
&lt;BR /&gt;
!RANGE[8, 22)STEP 2,&lt;BR /&gt;
!RANGE(22, 28)STEP 3,&lt;BR /&gt;
!RANGE(28, 32)STEP 2,&lt;BR /&gt;
!RANGE(32, 38)STEP 3,&lt;BR /&gt;
!RANGE(40, 130)STEP 5,&lt;BR /&gt;
!RANGE(130, 200)STEP 10,&lt;BR /&gt;
!RANGE(200, 300]STEP 20&lt;BR /&gt;
&lt;BR /&gt;
Has found the following decision:&lt;BR /&gt;
&lt;BR /&gt;
IF B &amp;lt; 0.022 THEN&lt;BR /&gt;
	D = 0.008&lt;BR /&gt;
	D_step = 0.002&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF B &amp;gt; 0.022 AND B &amp;lt; 0.028 THEN&lt;BR /&gt;
	D = 0.022&lt;BR /&gt;
	D_step = 0.003&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF B &amp;gt; 0.028 AND B &amp;lt; 0.032 THEN&lt;BR /&gt;
	D = 0.030&lt;BR /&gt;
	D_step = 0.002&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF B &amp;gt; 0.032 AND B &amp;lt; 0.038 THEN&lt;BR /&gt;
	D = 0.032&lt;BR /&gt;
	D_step = 0.003&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF B &amp;gt; 0.038 AND B &amp;lt; 0.130 THEN&lt;BR /&gt;
	D = 0.040&lt;BR /&gt;
	D_step = 0.005&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF B &amp;gt; 0.130 AND B &amp;lt; 0.200 THEN&lt;BR /&gt;
	D = 0.130&lt;BR /&gt;
	D_step = 0.010&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF B &amp;gt; 0.200 THEN&lt;BR /&gt;
	D = 0.200&lt;BR /&gt;
	D_step = 0.020&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
FOR j = 0 TO (B - D)/ D_step&lt;BR /&gt;
    D = D + D_step&lt;BR /&gt;
NEXT j&lt;BR /&gt;
&lt;BR /&gt;
Very long script has turned out. It is possible to make it more shortly?</description>
      <pubDate>Tue, 04 Jul 2006 19:23:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21689#M34101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-04T19:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21690#M34102</link>
      <description>Because you work with AC7 you can't use the graphical hotspots, which would make it very comfortable to edit.&lt;BR /&gt;
&lt;BR /&gt;
I would change the script to
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;lang=INT(B/0.001)*0.001
IF B&amp;gt;=0.008 then lang = 0.008 + INT((B-0.008)/0.002)*0.002
IF B&amp;gt;=0.022 then lang = 0.022 + INT((B-0.022)/0.003)*0.003
IF B&amp;gt;=0.028 then lang = 0.028 + INT((B-0.028)/0.002)*0.002
IF B&amp;gt;=0.032 then lang = 0.032 + INT((B-0.032)/0.003)*0.003
IF B&amp;gt;=0.040 then lang = 0.040 + INT((B-0.040)/0.005)*0.005
IF B&amp;gt;=0.130 then lang = 0.130 + INT((B-0.130)/0.010)*0.010
IF B&amp;gt;=0.200 then lang = 0.200 + INT((B-0.200)/0.020)*0.020
&lt;/PRE&gt;
I haven't tested, so be aware of bugs.&lt;BR /&gt;
&lt;BR /&gt;
If you are successful, remember that the deeper sense of openGDL is to return improvements to the community. &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt;</description>
      <pubDate>Wed, 05 Jul 2006 06:45:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21690#M34102</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-07-05T06:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21691#M34103</link>
      <description>F. Beister, I thank for participation.&lt;BR /&gt;
I too tried to use function INT, but have not achieved the necessary result.&lt;BR /&gt;
&lt;BR /&gt;
Let's consider one set of numbers (IF B&amp;gt; =0.008 then...), the rest works similarly.&lt;BR /&gt;
So, there will be following results:&lt;BR /&gt;
IF B=0.009, then lang=0.008! Corrects to smaller value. It is necessary to correct to the greater value. &lt;BR /&gt;
IF B=0.010, then lang=0.010! Result true.&lt;BR /&gt;
&lt;BR /&gt;
I have tried to make change.&lt;BR /&gt;
IF B&amp;gt; =0.008 then lang = 0.008 + INT ((B-0.008&lt;FONT color="#ff0076"&gt;+0.002&lt;/FONT&gt;)/0.002) *0.002 &lt;BR /&gt;
Has received the following results:&lt;BR /&gt;
IF B=0.009, then lang=0.010! Corrects to the greater value. Result true.&lt;BR /&gt;
IF B=0.010, then lang=0.012! Result incorrect. There should be identical values.&lt;BR /&gt;
&lt;BR /&gt;
There are still ideas?&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;If you are successful, remember that the deeper sense of openGDL is to return improvements to the community&lt;/BLOCKQUOTE&gt;

I adapt an element for the standard of GOST (Russia). And it will be freely distributed. Whether it will be interesting in Europe or in other countries?</description>
      <pubDate>Wed, 05 Jul 2006 10:33:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21691#M34103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-05T10:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21692#M34104</link>
      <description>Try this:&lt;BR /&gt;
&lt;BR /&gt;
IF B&amp;gt;=0.008 then lang = 0.008 + INT((B-0.008)/0.002+0.0019)*0.002&lt;BR /&gt;
&lt;BR /&gt;
I thought indeed, that you want to round down, not up. You need to be the smallest value below the next step.&lt;BR /&gt;
&lt;BR /&gt;
What is "the standard of GOST"?</description>
      <pubDate>Wed, 05 Jul 2006 11:20:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21692#M34104</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-07-05T11:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21693#M34105</link>
      <description>May be something like this will work. It is like Frank's solution, but I think it is more readable due using of millimeters.&lt;BR /&gt;
&lt;BR /&gt;
B = 1000*B&lt;BR /&gt;
IF B&amp;lt;=8 then B = 8&lt;BR /&gt;
IF B&amp;gt;8 AND B&amp;lt;=22 THEN B = 8 + CEIL((B-8 )/2)*2 &lt;BR /&gt;
IF B&amp;gt;22 AND B&amp;lt;=28 THEN B = 22 + CEIL((B-22)/3)*3 &lt;BR /&gt;
IF B&amp;gt;28 AND B&amp;lt;=32 THEN B = 28 + CEIL((B-28 )/2)*2 &lt;BR /&gt;
IF B&amp;gt;32 AND B&amp;lt;=40 THEN B = 32 + CEIL((B-32)/3)*3 &lt;BR /&gt;
IF B&amp;gt;40 AND B&amp;lt;=130 THEN B = 40 + CEIL((B-40)/5)*5 &lt;BR /&gt;
IF B&amp;gt;130 AND B&amp;lt;=200 THEN B = 130 + CEIL((B-130)/10)*10 &lt;BR /&gt;
IF B&amp;gt;200 THEN B = 200 + CEIL((B-200)/20)*20 &lt;BR /&gt;
B = B/1000&lt;BR /&gt;
&lt;BR /&gt;
PS: Actually I think a more flexible solution will be using an array and a subroutine which will search the range and do the calc finally.</description>
      <pubDate>Wed, 05 Jul 2006 19:54:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21693#M34105</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2006-07-05T19:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change of parameter under the set list and ...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21694#M34106</link>
      <description>Perfectly!&lt;BR /&gt;
The decision laid on a surface. It is necessary more? Use CEIL (). It is necessary less? Use INT ().&lt;BR /&gt;
Use of function CEIL (), yields identical results with my first script.&lt;BR /&gt;
If "B" = 39, then "D" = 40.&lt;BR /&gt;
If "B" = 40, then "D" = 40.&lt;BR /&gt;
Thanks, Oleg! Thanks, Frank!&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Actually I think a more flexible solution will be using an array and a subroutine which will search the range and do the calc finally.&lt;/BLOCKQUOTE&gt;
This idea was the first in my head. But absence of knowledge, has led to to search of other method.&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;What is "the standard of GOST"? &lt;/BLOCKQUOTE&gt;
GOST are standards used in Russia. As DIN in Germany.</description>
      <pubDate>Wed, 05 Jul 2006 22:25:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Change-of-parameter-under-the-set-list-and/m-p/21694#M34106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-05T22:25:12Z</dc:date>
    </item>
  </channel>
</rss>

