Donate Now Goal amount for this year: 2500 USD, Received: 2174 USD (87%)

Results 1 to 5 of 5
Like Tree4Likes
  • 3 Post By amoursol
  • 1 Post By ScubaMan

Thread: List Clean on Another List

  1. #1
    Member ScubaMan's Avatar
    Join Date
    July 6, 2015
    Posts
    203
    Current Local Time
    03:47 AM

    List Clean on Another List

    Good day all,

    Is there a way to use List.Clean and know which list items were removed so I can remove the same items from another list?

    Thanks for you help,
    Steven

  2. #2
    Member ScubaMan's Avatar
    Join Date
    July 6, 2015
    Posts
    203
    Current Local Time
    03:47 AM
    Something like List.Clean.ByKey

    How you can sort list by a key can I clean them by one?

  3. #3
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    6,190
    Current Local Time
    06:47 AM
    Don't know an answer but these should help:

    SortByKey
    Clean

    There are also a number of custom list management nodes - I know Grimshaw & Rhythm both have several.
    Last edited by cellophane; September 29th, 2017 at 01:52 PM.

  4. #4
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    612
    Current Local Time
    11:47 AM
    This is one way to do it!

    Attached Thumbnails Attached Thumbnails List Clean on Another List-revitforumquery_getitematindex.jpg  
    cganiere, ScubaMan and josephpeel like this.

  5. #5
    Member ScubaMan's Avatar
    Join Date
    July 6, 2015
    Posts
    203
    Current Local Time
    03:47 AM
    Thanks Amoursol and Cellophane,

    Unfortunately due to the complexity of the list your way does not work easily Amoursol.
    For my solution I broke it into three chuck with some script slow down but not too bad.

    Capture 1:
    List information coming out of Springs.Collector.ElementsInView is in Level @2. Empty Lists are are returned at level @3 and @2. I wish to keep this list structure because the @3 is the sheet and @2 are the views on the sheet.

    List.Clean works great to clean the list but there is no way to clean the original list coming out of List.AddItemToFront.

    Capture 2:
    Since there is no way to match the lists I use Clockworks Element.OwnerView.

    Capture 3:
    I then need to know what sheet the views are on. Since you cannot fine what sheet a legend is on this is what I came up with. Grab the First view in each of the filtered list and then cross compare them against each list to find matching elements. I can then pull the first element (the sheet) from the original list coming out of List.AddItemToFront in Capture 1.


    The cross product on Contains slows things down a little bit but the script is already slow because of Springs.Collector.ElementsInView. So whats a few more seconds anyway.

    Not the best way to go about it but it does work and I could not spend any more time on it. I may venture back and clean it up one day. This was my attempt to find a better way to export revision clouds than I had achieved before. Seems to be faster and work better. Previous Cloud Exporter

    Thank for your help and suggestions,
    Steven
    Attached Thumbnails Attached Thumbnails List Clean on Another List-capture.png   List Clean on Another List-capture2.png   List Clean on Another List-capture3.png  
    amoursol likes this.

Similar Threads

  1. List of Views from List of View Names?
    By ryntau in forum Dynamo BIM
    Replies: 2
    Last Post: September 18th, 2017, 02:16 AM
  2. Detail item list not show full list (2017)
    By ledgewood33 in forum Architecture and General Revit Questions
    Replies: 0
    Last Post: November 18th, 2016, 02:41 PM
  3. RTC: Hot List!
    By RTC in forum Blog Feeds
    Replies: 0
    Last Post: September 20th, 2016, 05:15 AM
  4. Replies: 0
    Last Post: March 12th, 2015, 06:16 AM
  5. Sheet List
    By Shields08 in forum Architecture and General Revit Questions
    Replies: 4
    Last Post: April 1st, 2014, 04:59 PM

Posting Permissions

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