cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
jc4d
Expert

Show Parameter function

Hello,

We have a hideparameter function, but is there a showparameter somewhere hidden in the deeps of gdl code?

 

I want to show a parameter only when couple of conditions are met among the many I have.

 

 

IF door_opening <> 1 AND multi_door <> 1 THEN
	HIDEPARAMETER "second_door_opening"
ENDIF

 


The idea behind it is, if the door_opening and multi_door are both different than 1, then hide the parameter. For some reason is not working for me.

For example, if door_opening = 2 and multi_door = 1, the parameter is showing still, which is not what I want. Only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden.

 

Hope all  this makes sense.

 

Juan.

1 Solution

Accepted Solutions
AllanP
Expert

Hi,

 

what you said in the first half of you description was

"if the door_opening and multi_door are both different than 1, then hide the parameter"

IF door_opening # 1 AND multi_door # 1 THEN
	HIDEPARAMETER "second_door_opening"
ENDIF

***Not the outcome you describe in the second part of your description

 

what you said in the second half of your your description was

"Only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden"

 

IF door_opening = 1 AND multi_door = 1 THEN
       !!!Show the parameter
ELSE
	HIDEPARAMETER "second_door_opening"
ENDIF

 

 

there is no "SHOWPARAMETER" command.

 

another way to write that in English would be:

"if the door_opening is different than 1 or multi_door is different than 1, then hide the parameter,

so only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden."

IF door_opening # 1 OR multi_door # 1 THEN
	HIDEPARAMETER "second_door_opening"
ENDIF

 

The AND/OR for exclusion combinations are sometimes confusing.

the # "not equal to" is on the Shift+3 key on the keyboard.

 

I hope this helps.

I have been using ArchiCAD continually since ArchiCAD 4.5
Member of Architalk since 2003, but missed the migration from Architalk to Graphisoft Communities. Melbourne, Australia

Go to post

2 Replies 2
jc4d
Expert

It seems like using OR instead of AND it does the trick, but not sure if it is the right way.

IF door_opening <> 1 OR multi_door <> 1 THEN
	HIDEPARAMETER "second_door_opening"
ENDIF

 

Juan

AllanP
Expert

Hi,

 

what you said in the first half of you description was

"if the door_opening and multi_door are both different than 1, then hide the parameter"

IF door_opening # 1 AND multi_door # 1 THEN
	HIDEPARAMETER "second_door_opening"
ENDIF

***Not the outcome you describe in the second part of your description

 

what you said in the second half of your your description was

"Only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden"

 

IF door_opening = 1 AND multi_door = 1 THEN
       !!!Show the parameter
ELSE
	HIDEPARAMETER "second_door_opening"
ENDIF

 

 

there is no "SHOWPARAMETER" command.

 

another way to write that in English would be:

"if the door_opening is different than 1 or multi_door is different than 1, then hide the parameter,

so only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden."

IF door_opening # 1 OR multi_door # 1 THEN
	HIDEPARAMETER "second_door_opening"
ENDIF

 

The AND/OR for exclusion combinations are sometimes confusing.

the # "not equal to" is on the Shift+3 key on the keyboard.

 

I hope this helps.

I have been using ArchiCAD continually since ArchiCAD 4.5
Member of Architalk since 2003, but missed the migration from Architalk to Graphisoft Communities. Melbourne, Australia

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!