We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

changing A & B values according to what you pick

Anonymous
Not applicable
I'm using the wall niche object combined with an object of my own to create something we can actually use. The problem is I want one object to work with 3 different sizes. So I want to add a line like

IF paramaterDuck=model1 THEN A=1'-5" AND B=4'-8" Can I add this to the master script. I added it to the 3D script and it looks fine in elevation but the 3D view and plan still shows the values for A and B that is in the dialog box. I hope I explained this well enough.

Thanks for any help,
Michele
4 REPLIES 4
Anonymous
Not applicable
Michele,
I believe there is something wrong with the syntax.
If, indeed, you have written ,
"IF paramaterDuck=model1 THEN A=1'-5" AND B=4'-8",
this does not work in GDL.
You can not use "AND" in the right side of the IF....THEN.... statement.
You need to write:

IF paramaterDuck=model1 THEN
A=1'-5"
B=4'-8"
endif

When I was learning GDL I tried writing a statement like this
and several people explained to me that "AND" is the logical AND
not the additive AND.

Yes, put it in the master script.

I hope this helps,
Peter Devlin
Anonymous
Not applicable
Thanks for the help. THere's more than 1 option so I'll have to look in the cookbook to see how to write that. Would I just need to add and else between each option and end with an endif or an end?

Thanks,
Michele
Anonymous
Not applicable
Michele,
The simplest thing to do is write separate IF statements.

IF paramaterDuck=model1 THEN
A=1'-5"
B=4'-8"
endif

IF paramaterDuck=model2 THEN
A=2'-5"
B=3'-8"
endif

and so on.
Peter Devlin
Aussie John
Newcomer
Michele wrote:
Thanks for the help. THere's more than 1 option so I'll have to look in the cookbook to see how to write that. Would I just need to add and else between each option and end with an endif or an end?

Thanks,
Michele
You can only use one else statement which is sandwiched between the if and endif commands
if…
statement A
statement B
else
statement 1
statement 2
endif
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]