Announcement

Collapse
No announcement yet.

If Else Statement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    If Else Statement

    Dear Dynamo Experts,

    I have a simple question on if statement. How to implement something like if true do A things, else do B things in dynamo? I mean like if true go to this node else go to that node.

    I actually have problem something like this:

    if true i want A list else B list.
    Attached Files
    Last edited by Mimi Azimar; May 25, 2017, 07:27 AM.

    #2
    I've had issues with if logic in the code block, so I usually use the "Formula" node. In it you can use syntax like you would in Revit - if(a, b, c)
    Julie Kidder
    Architect + BIM Director
    Hartman + Majewski Design Group

    Comment


      #3
      same result.

      Attached Files

      Comment


        #4
        Hello jmk,

        The inherent logic behind 'if statements' in Dynamo is a little out of whack - there is a reason for it (And I did get told once) that makes sense, but it doesn't comply with how if logic in Revit works.

        To achieve such, use the following node from the Zebra package by my colleague Mark Thorley.

        Attached Files

        Sol Amour

        Architectural Explorer, Digital warrior, Affectual adventurer and Curious Human Being
        Portfolio Website @ Cargo Collective

        Comment


          #5
          Thanks a lot Amoursol, I love the design script, giving me ideas for other problems.

          Comment

          Related Topics

          Collapse

          • Clockwork Nodes Are amamzing.....but
            all of the sudden I do not know what is going on....

            My clockwork nodes are returning NULL...

            element.location is the first...
            January 18, 2017, 05:08 AM
          • Subdirectories in Dynamo
            Hi guys,

            which node do I need to use so that Dynamo searches for the subdirectories too, instead of only the main directory?
            I know...
            February 3, 2020, 07:41 AM
          • Re: BVN Node “View.SetUnderlayToNone”
            Hello. This is my first post on the Dynamo Forum, and I very green when it comes to Dynamo (for Revit 2017); so please forgive me if I use any incorrect...
            October 13, 2016, 08:39 PM
          • List.ContainsItem
            Dynamo 1.3 had a node named List.ContainsItem
            It could compare two lists and tell you which items were in both lists.
            2.0 does not have...
            March 28, 2019, 07:32 PM
          • Dropdown list combined with IF function
            Hello there,

            I am still learning Dynamo - thats why I am still having problems with basic stuff -

            I wanted to create a script...
            November 4, 2019, 12:20 PM
          Working...
          X