Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

creating xor function for visibility in revit 2014

3 ANTWORTEN 3
Antworten
Nachricht 1 von 4
Anonymous
540 Aufrufe, 3 Antworten

creating xor function for visibility in revit 2014

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

3 ANTWORTEN 3
Nachricht 2 von 4
MostafaElashmawy
als Antwort auf: Anonymous

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

Nachricht 3 von 4
Ilic.Andrej
als Antwort auf: Anonymous

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

Nachricht 4 von 4
Ilic.Andrej
als Antwort auf: Anonymous

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

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report