creating xor function for visibility in revit 2014

creating xor function for visibility in revit 2014

Anonymous
Not applicable
889 Views
3 Replies
Message 1 of 4

creating xor function for visibility in revit 2014

Anonymous
Not applicable

hi,

I am in the process of providing a conditional statement for visibility in family consisting of 3 parameters X, Y, Z.

my requirement is IF X= true, Y=true   Z should be false

                             IF X= true, Y=false   Z should be true

                             IF X= false,Y=true   Z should be true

                             IF X= false,Y=false   Z should be false

 

Can any one please help me in providing a conditional statement as per above function for Z

0 Likes
890 Views
3 Replies
Replies (3)
Message 2 of 4

MostafaElashmawy
Advisor
Advisor

It should be as below:

IF (X= true, IF (Y= true, Z= false, Z= true), IF (Y= true, Z= true, Z= false))

 

the words true or false should be treated as strings if needed "true" / "false"

Mostafa Elashmawy
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 3 of 4

Ilic.Andrej
Advisor
Advisor

My advice is to use Notepad and write the formula the way programmers would do it (so that you don't get confused). Then, make a condensed form and paste it back to Revit.

 

    if(condition,
        result if true,
        result if false
    )

 

Assuming that all parameters are Yes/No parameters, this formula can be assigned to Z. (1=0 will report false, 1=1 will report true).

 

    if(and(X,Y),
        1=0,
        if(or(X,Y),
            1=1,
            1=0,
        )
    )

 

...so, the condensed form would be:

 

if(and(X,Y),1=0,if(or(X,Y),1=1,1=0,))



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

0 Likes
Message 4 of 4

Ilic.Andrej
Advisor
Advisor

Sorry about the typo, just deleted the comma at the end of the formula

 

    if(and(X,Y),
        1=0,
        if(or(X,Y),
            1=1,
            1=0,
        )
    )

 

...so, the condensed form would be:

 

if(and(X,Y),1=0,if(or(X,Y),1=1,1=0,))

 

 

 

 

    if(and(X,Y),
        1=0,
        if(or(X,Y),
            1=1,
            1=0
        )
    )

 

...so, the condensed form would be:

 

if(and(X,Y),1=0,if(or(X,Y),1=1,1=0))



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

0 Likes