Announcement

Collapse
No announcement yet.

List.ContainsItem

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

    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 this node. 2.0 has one named List.Contains, but it does not work the same.
    1.3 List.ContainsItem gave me a list that I could then use in a Boolean Mask.
    When I run the same graph in 2.0, the List.Contains only returns one True or False value.
    I've tried using Levels, but a.) Both lists only have one Level and b.) it doesn't make any difference in the results.

    Is there a 2.0 equivalent to List.ContainsItem ?
    Dave Plumb
    BWBR Architects; St Paul, MN

    CADsplaining: When a BIM rookie tells you how you should have done something.

    #2
    There is a List.Contains node OOTB in 2.0.2
    Revit for newbies - A starting point for RFO


    chad
    BEER: Better, Efficient, Elegant, Repeatable.

    Comment


      #3
      Yes, indeed, it does.
      Originally posted by DaveP View Post
      2.0 does not have this node. 2.0 has one named List.Contains, but it does not work the same.
      I should have mentioned, I am on 2.0.2
      Dave Plumb
      BWBR Architects; St Paul, MN

      CADsplaining: When a BIM rookie tells you how you should have done something.

      Comment


        #4
        Ahah!
        Seems like an unusual method, but I had to explicitly tell it to use Level 1 to get it to return the same thing that List.ContainsItem did in 1.3
        Dave Plumb
        BWBR Architects; St Paul, MN

        CADsplaining: When a BIM rookie tells you how you should have done something.

        Comment


          #5
          Originally posted by DaveP View Post
          Ahah!
          Seems like an unusual method, but I had to explicitly tell it to use Level 1 to get it to return the same thing that List.ContainsItem did in 1.3
          [ATTACH=CONFIG]36257[/ATTACH]
          "Invalid attachment specified"
          There are no stupid questions, only stupid people

          Comment


            #6
            Weird, it opened for me. It's just a screen shot
            ListContains2.PNG
            Been that kind of a day
            Dave Plumb
            BWBR Architects; St Paul, MN

            CADsplaining: When a BIM rookie tells you how you should have done something.

            Comment


              #7
              that was last night on my ipad, this is today on my work PC








              I can see your new screenshot now though.

              It was awhile back, but there were are a few differences I stumbled over when I moved to 2.0 and I had seen the list level behavior you describe. The AUTO lacing function is very handy but you still need to change it a lot, just not as much as before.
              In my 2.0 scripts at least, I have found that Materials need to be collected from Element Types>All Elements of Type, where previously in 1.3 they were collected by Categories>All Elements of Category.
              Attached Files
              Last edited by elton williams; March 29, 2019, 02:15 AM.
              There are no stupid questions, only stupid people

              Comment


                #8
                Just an alternative:

                I really like using these 2 Nodes for figuring out the common items/missing items between 2 lists:

                list_comparison.png


                @Elton: So funny, I just 5 minutes ago made this quick purge in Dynamo 2.0.2

                materials_version.png

                Comment


                  #9
                  Originally posted by Bjorn_K View Post
                  I really like using these 2 Nodes for figuring out the common items/missing items between 2 lists:

                  [ATTACH=CONFIG]36266[/ATTACH]
                  Why does the input order matter on the SetDifference node? The difference between the lists is the same either way...
                  Revit for newbies - A starting point for RFO


                  chad
                  BEER: Better, Efficient, Elegant, Repeatable.

                  Comment


                    #10
                    The Difference in that Node is defined as the items in list 1 that are not present in list 2.

                    Comment

                    Related Topics

                    Collapse

                    • 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?...
                      May 25, 2017, 07:19 AM
                    • 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
                    • Rename View Names - So Close, yet so far...
                      Learning Dynamo and looking for some help from the community to help me understand where I may be going wrong with this program. See Image.
                      No...
                      April 5, 2016, 03:46 AM
                    • List.SortByKey
                      Doing a spot of "copification" and spotted in a video this "List.SortByKey" node:



                      that features level...
                      April 2, 2019, 11:14 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
                    Working...
                    X