Test Parameter Values In Parameter Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-06 08:08 PM
VALUES `Door_Type_Code` `DHG`, `S&R`, `F`, `NL`, `HG`, `FNL`
IF Door_Type_Code = `DHG` THEN
VALUES `Door_Hardware_Code` `1`, `2`, `3`
ELSE
VALUES `Door_Hardware_Code` `10`, `20`, `30`
ENDIF
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-06 08:24 PM
I'm still somewhat hazy on the absolute functions of the two scripts, so I end up with a lot of trial and error.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-06 09:12 PM

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:
IF `DCA_Material` = `AL` THEN
I took off the quotes and it worked fine. I put the whole thing back in the Parameter Script and it works there too.
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.

Thanks James!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-06 09:14 PM
Jay wrote: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?
In the Parameter Script of an object, I tried something similar to the following:
VALUES `Door_Type_Code` `DHG`, `S&R`, `F`, `NL`, `HG`, `FNL`
IF Door_Type_Code = `DHG` THEN
VALUES `Door_Hardware_Code` `1`, `2`, `3`
ELSE
VALUES `Door_Hardware_Code` `10`, `20`, `30`
ENDIF
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?
- Matthew Peychich
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-08 08:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-08 09:30 PM
MikeS wrote: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.
David Nicholson Cole recommends use the Master script whenever possible/appropriate - he advised me that the the Parameter script is 'too slow'!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-08 09:38 PM
James wrote: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?MikeS wrote: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.
David Nicholson Cole recommends use the Master script whenever possible/appropriate - he advised me that the the Parameter script is 'too slow'!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-08 10:38 PM
-- Matthew Peychich

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-08 11:41 PM
Matthew wrote:PRECISELY!
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.
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.
My personal reason also has to do with the way I built a Menu.:
mv1="Stationary"
mv2="Moving slowly"
mv3="Moving quickly!"
VALUES "motionmode" mv1,mv2,mv3
Later in the other scripts you can say things like :
IF motionmode=mv3 THEN .........
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,
VALUES "number" 0,1,2,3,4,5
or:
FOR k=1 TO numb
PUT k
NEXT k
VALUES "number" GET(NSP)
which do not have any variables.
http://sustainabletallbuildings.blogspot.com
http://chargingtheearth.blogspot.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-09 01:07 AM
-- Matthew Peychich