<?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: Test Parameter Values In Parameter Script? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98007#M36202</link>
    <description>&lt;BLOCKQUOTE&gt;MikeS wrote:&lt;BR /&gt;David Nicholson Cole recommends use the Master script whenever possible/appropriate - he advised me that the the Parameter script is 'too slow'!&lt;/BLOCKQUOTE&gt;

I'd like to know more about this. What's slow about it? I use the Param script on the theory that the Master script gets read when any script is read, and so extra lines in there will be extra over and over, slowing the 2D and 3D scripts down. Crazy? Maybe DNC will chime in.</description>
    <pubDate>Wed, 08 Jun 2005 19:30:54 GMT</pubDate>
    <dc:creator>James Murray</dc:creator>
    <dc:date>2005-06-08T19:30:54Z</dc:date>
    <item>
      <title>Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98002#M36197</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;In the Parameter Script of an object, I tried something similar to the following:&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="blue"&gt;VALUES `Door_Type_Code` `DHG`, `S&amp;amp;R`, `F`, `NL`, `HG`, `FNL`&lt;BR /&gt;
IF Door_Type_Code = `DHG` THEN&lt;BR /&gt;
    VALUES `Door_Hardware_Code` `1`, `2`, `3`&lt;BR /&gt;
ELSE&lt;BR /&gt;
    VALUES `Door_Hardware_Code` `10`, `20`, `30`&lt;BR /&gt;
ENDIF&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
This apparently fails because `Door_Hardware_Code` isn't initialized at this point.  Is there any way to accomplish the task of setting possible values based on another parameter's current value?&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Jun 2005 18:08:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98002#M36197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-06T18:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98003#M36198</link>
      <description>I don't know if it will solve this one, but when something doesn't work in the Parameter Script, I try it in the Master Script. Values lists definitely work there, and I've observed trouble with conditionals in the param script.&lt;BR /&gt;
&lt;BR /&gt;
I'm still somewhat hazy on the absolute functions of the two scripts, so I end up with a lot of trial and error.&lt;BR /&gt;
&lt;BR /&gt;
I try to use the param script for everything I can, but some things just don't work. Also the lack of a functional PRINT statement is annoying.</description>
      <pubDate>Mon, 06 Jun 2005 18:24:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98003#M36198</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2005-06-06T18:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98004#M36199</link>
      <description>I am a moron!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
I moved the IF and VALUES statements to the Master Script and it still didn't work.  After about 10 minutes it finally dawned on me that the variable has quotes around it, Like this:&lt;BR /&gt;
&lt;BR /&gt;
IF &lt;FONT color="red"&gt;`&lt;/FONT&gt;DCA_Material&lt;FONT color="red"&gt;`&lt;/FONT&gt; = `AL` THEN&lt;BR /&gt;
&lt;BR /&gt;
I took off the quotes and it worked fine.  I put the whole thing back in the Parameter Script and it works there too.&lt;BR /&gt;
&lt;BR /&gt;
But at least I learned that you can put VALUES statements in the Master Script, so this thread isn't a total loss.  I also learned that I should always post the exact code -- not make up something simplified. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_rolleyes.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
Thanks James!</description>
      <pubDate>Mon, 06 Jun 2005 19:12:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98004#M36199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-06T19:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98005#M36200</link>
      <description>&lt;BLOCKQUOTE&gt;Jay wrote:&lt;BR /&gt;In the Parameter Script of an object, I tried something similar to the following:&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="blue"&gt;VALUES `Door_Type_Code` `DHG`, `S&amp;amp;R`, `F`, `NL`, `HG`, `FNL`&lt;BR /&gt;
IF Door_Type_Code = `DHG` THEN&lt;BR /&gt;
    VALUES `Door_Hardware_Code` `1`, `2`, `3`&lt;BR /&gt;
ELSE&lt;BR /&gt;
    VALUES `Door_Hardware_Code` `10`, `20`, `30`&lt;BR /&gt;
ENDIF&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
This apparently fails because `Door_Hardware_Code` isn't initialized at this point.  Is there any way to accomplish the task of setting possible values based on another parameter's current value?&lt;/BLOCKQUOTE&gt;

I took those exact lines of code and pasted them into an object and created the two variables and they seem to work just fine.  what exactly are you trying to do with this that isnt working?&lt;BR /&gt;
&lt;BR /&gt;
- Matthew Peychich</description>
      <pubDate>Mon, 06 Jun 2005 19:14:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98005#M36200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-06T19:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98006#M36201</link>
      <description>Just as a matter of information. David Nicholson Cole recommends use the Master script whenever possible/appropriate - he advised me that the the Parameter script is 'too slow'!</description>
      <pubDate>Wed, 08 Jun 2005 18:57:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98006#M36201</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-08T18:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98007#M36202</link>
      <description>&lt;BLOCKQUOTE&gt;MikeS wrote:&lt;BR /&gt;David Nicholson Cole recommends use the Master script whenever possible/appropriate - he advised me that the the Parameter script is 'too slow'!&lt;/BLOCKQUOTE&gt;

I'd like to know more about this. What's slow about it? I use the Param script on the theory that the Master script gets read when any script is read, and so extra lines in there will be extra over and over, slowing the 2D and 3D scripts down. Crazy? Maybe DNC will chime in.</description>
      <pubDate>Wed, 08 Jun 2005 19:30:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98007#M36202</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2005-06-08T19:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98008#M36203</link>
      <description>&lt;BLOCKQUOTE&gt;James wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;MikeS wrote:&lt;BR /&gt;David Nicholson Cole recommends use the Master script whenever possible/appropriate - he advised me that the the Parameter script is 'too slow'!&lt;/BLOCKQUOTE&gt;

I'd like to know more about this. What's slow about it? I use the Param script on the theory that the Master script gets read when any script is read, and so extra lines in there will be extra over and over, slowing the 2D and 3D scripts down. Crazy? Maybe DNC will chime in.&lt;/BLOCKQUOTE&gt;

Also, what are the differences between the Master Script and the Parameter Script?  Is there anything you can do in one that you cannot do in the other?</description>
      <pubDate>Wed, 08 Jun 2005 19:38:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98008#M36203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-08T19:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98009#M36204</link>
      <description>the param script i believe is read only when a change has been detected or when the dialog box opened and closed.  however the master script is read constantly.  for all 2D and 3D. &lt;BR /&gt;
 &lt;BR /&gt;
-- Matthew Peychich</description>
      <pubDate>Wed, 08 Jun 2005 20:38:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98009#M36204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-08T20:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98010#M36205</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;the param script i believe is read only when a change has been detected or when the dialog box opened and closed.  however the master script is read constantly.  for all 2D and 3D. 
&lt;/BLOCKQUOTE&gt;

&lt;B&gt;PRECISELY! &lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
the other main reason is this. You put some menus into the parameter script - you then want to have some IF statements as a result - so you have to move to the master script to do this, because any results of the IF statements wont be passed on correctly to the 2D and 3D if only done in the Parameter Script - there is a disconnnection in the thinking. &lt;BR /&gt;
&lt;BR /&gt;
  My personal reason also has to do with the way I built a Menu.:&lt;BR /&gt;
&lt;BR /&gt;
mv1="Stationary"&lt;BR /&gt;
mv2="Moving slowly"&lt;BR /&gt;
mv3="Moving quickly!"&lt;BR /&gt;
VALUES "motionmode" mv1,mv2,mv3&lt;BR /&gt;
&lt;BR /&gt;
Later in the other scripts you can say things like :&lt;BR /&gt;
IF motionmode=mv3 THEN .........&lt;BR /&gt;
&lt;BR /&gt;
This method of building menus ONLY works correctly if you do it in the Master Script, because the other scripts will not know what mv1 and mv2 are. As a result of this, I never use the Parameter script except for the very simplest things, eg,&lt;BR /&gt;
VALUES "number" 0,1,2,3,4,5&lt;BR /&gt;
&lt;BR /&gt;
or: &lt;BR /&gt;
&lt;BR /&gt;
FOR k=1 TO numb&lt;BR /&gt;
  PUT k&lt;BR /&gt;
  NEXT k&lt;BR /&gt;
VALUES "number" GET(NSP)&lt;BR /&gt;
&lt;BR /&gt;
which do not have any variables.</description>
      <pubDate>Wed, 08 Jun 2005 21:41:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98010#M36205</guid>
      <dc:creator>david nicholson-cole</dc:creator>
      <dc:date>2005-06-08T21:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98011#M36206</link>
      <description>you can achieve the same thing using the parameters script however it is a little more troublesome.  it requires this kind of stategic placement of code.  if you can do that, the objects parameters become much more efficient than anything youll get by coding directly to the master script.&lt;BR /&gt;
&lt;BR /&gt;
-- Matthew Peychich</description>
      <pubDate>Wed, 08 Jun 2005 23:07:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98011#M36206</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-08T23:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98012#M36207</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;...it requires this kind of stategic placement of code.  if you can do that, the objects parameters become much more efficient than anything youll get by coding directly to the master script.&lt;/BLOCKQUOTE&gt;

Could you elaborate on that a little bit?  Maybe give some examples.</description>
      <pubDate>Wed, 08 Jun 2005 23:13:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98012#M36207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-08T23:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Test Parameter Values In Parameter Script?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98013#M36208</link>
      <description>&lt;BLOCKQUOTE&gt;david wrote:&lt;BR /&gt;
  My personal reason also has to do with the way I built a Menu.:&lt;BR /&gt;
&lt;BR /&gt;
mv1="Stationary"&lt;BR /&gt;
mv2="Moving slowly"&lt;BR /&gt;
mv3="Moving quickly!"&lt;BR /&gt;
VALUES "motionmode" mv1,mv2,mv3&lt;BR /&gt;
&lt;BR /&gt;
Later in the other scripts you can say things like :&lt;BR /&gt;
IF motionmode=mv3 THEN .........&lt;BR /&gt;
&lt;BR /&gt;
This method of building menus ONLY works correctly if you do it in the Master Script, because the other scripts will not know what mv1 and mv2 are. As a result of this, I never use the Parameter script except for the very simplest things.&lt;/BLOCKQUOTE&gt;

Interesting, I have found no problems using the unsubstituted values from the param script ie:&lt;BR /&gt;
 &lt;B&gt;IF motionmode="Moving slowly" THEN .........&lt;/B&gt; in another script will work fine.</description>
      <pubDate>Wed, 08 Jun 2005 23:28:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Test-Parameter-Values-In-Parameter-Script/m-p/98013#M36208</guid>
      <dc:creator>Richard Swann</dc:creator>
      <dc:date>2005-06-08T23:28:54Z</dc:date>
    </item>
  </channel>
</rss>

