How to state "check if condition is true, true then.., false leave as it is"

How to state "check if condition is true, true then.., false leave as it is"

Anonymous
Not applicable
1,468 Views
4 Replies
Message 1 of 5

How to state "check if condition is true, true then.., false leave as it is"

Anonymous
Not applicable

Hello again. 

Today I am here with a very basic newbie question 🙂

I am trying to write and if formula.

All these parameters are dimensions.

It should be like " Parameter 1 = IF(Parameter 1 > Parameter 2, Parameter 2 - 200, Parameter 1)

And now you saw where the error is, for false condition, I am referring to the parameter itself. What I need to do is just the thing I wrote, but it creates a circular chain of references so revit does not accept it.

What is this very basic thing that I am missing here? Probably I will be ashamed after i realize what was going on 🙂

 

Thank you in advance.

 

0 Likes
Accepted solutions (2)
1,469 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Btw I am aware that I can make another parameter for checking and it will not give any errors then, the only thing I am curious is is there anything can be done for a statement like " check the condition, if it is not like that, leave my parameter as it is?" 

0 Likes
Message 3 of 5

Anonymous
Not applicable
Accepted solution

Show us your actual formula.

I attach a screen shot of a basic IF statement:

Condition.JPG

0 Likes
Message 4 of 5

martijn_pater
Advisor
Advisor
Accepted solution

@Anonymous wrote:

All these parameters are dimensions.

It should be like " Parameter 1 = IF(Parameter 1 > Parameter 2, Parameter 2 - 200, Parameter 1)

And now you saw where the error is, for false condition, I am referring to the parameter itself. What I need to do is just the thing I wrote, but it creates a circular chain of references so revit does not accept it.


It is how @Anonymous says, but I think you need to associate a calculated parameter to the dimension instead of the Parameter 1, as below:

(input) Parameter 1 = x
(input) Parameter 2 = y
(associated to dimension) Parameter 1_calculated = if (Parameter 1 > Parameter 2, Parameter 2 -200, Parameter 1)

Could you elaborate on 'All these parameters are dimensions', what dimensions where? As to provide an answer to the circular chain of references issue.

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thank you for your replies. I figured out as you explained with multiple parameters supporting each other.

0 Likes