Donate Now Goal amount for this year: 3000 USD, Received: 1207 USD (40%)

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
Like Tree2Likes

Thread: List.ContainsItem

  1.    #1
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    2,949
    Current Local Time
    07:20 AM

    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 ?

  2.    #2
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    6,104
    Current Local Time
    08:20 AM
    There is a List.Contains node OOTB in 2.0.2

  3.    #3
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    2,949
    Current Local Time
    07:20 AM
    Yes, indeed, it does.
    Quote 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

  4.    #4
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    2,949
    Current Local Time
    07:20 AM
    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
    Attachment 36257

  5.    #5
    Forum Addict elton williams's Avatar
    Join Date
    December 7, 2010
    Location
    Gold Coast
    Posts
    2,602
    Current Local Time
    10:20 PM
    Quote 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
    Attachment 36257
    "Invalid attachment specified"

  6.    #6
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    2,949
    Current Local Time
    07:20 AM
    Weird, it opened for me. It's just a screen shot
    List.ContainsItem-listcontains2.png
    Been that kind of a day

  7.    #7
    Forum Addict elton williams's Avatar
    Join Date
    December 7, 2010
    Location
    Gold Coast
    Posts
    2,602
    Current Local Time
    10:20 PM
    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 Thumbnails Attached Thumbnails List.ContainsItem-rfo.jpg  
    Last edited by elton williams; March 29th, 2019 at 02:15 AM.

  8.    #8
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    313
    Current Local Time
    02:20 PM
    Just an alternative:

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

    List.ContainsItem-list_comparison.png


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

    List.ContainsItem-materials_version.png
    josephpeel likes this.

  9.    #9
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    6,104
    Current Local Time
    08:20 AM
    Quote 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:

    Click image for larger version. 

Name:	list_comparison.png 
Views:	18 
Size:	64.8 KB 
ID:	36266
    Why does the input order matter on the SetDifference node? The difference between the lists is the same either way...

  10.    #10
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    313
    Current Local Time
    02:20 PM
    The Difference in that Node is defined as the items in list 1 that are not present in list 2.
    cellophane likes this.

Page 1 of 2 12 LastLast

Similar Threads

  1. List Clean on Another List
    By ScubaMan in forum Dynamo BIM
    Replies: 4
    Last Post: October 2nd, 2017, 09:19 PM
  2. List of Views from List of View Names?
    By ryntau in forum Dynamo BIM
    Replies: 2
    Last Post: September 18th, 2017, 02:16 AM
  3. Detail item list not show full list (2017)
    By ledgewood33 in forum Architecture and General Revit Questions
    Replies: 0
    Last Post: November 18th, 2016, 03:41 PM
  4. RTC: Hot List!
    By RTC in forum Blog Feeds
    Replies: 0
    Last Post: September 20th, 2016, 05:15 AM
  5. Replies: 0
    Last Post: March 12th, 2015, 06:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •