Announcement

Collapse
No announcement yet.

List Clean on Another List

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

    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
    Something like List.Clean.ByKey

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

    Comment


      #3
      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 29, 2017, 01:52 PM.
      Revit for newbies - A starting point for RFO


      chad
      BEER: Better, Efficient, Elegant, Repeatable.

      Comment


        #4
        This is one way to do it!

        Attached Files

        Sol Amour

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

        Comment


          #5
          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 Files

          Comment

          Related Topics

          Collapse

          • Boolean OR for list
            Hello all,

            Logic / Action / or you can insert any number of booleans and it will pass true if any of them are true. Is there a way to do...
            September 14, 2017, 06:08 PM
          • Reading Painted materials from walls?
            I've just been down a rabbit hole trying to find an answer to this but a pretty straightforward question - is there a way with Dynamo to read the material...
            August 19, 2020, 07:47 PM
          • List Replace Items
            Hello all!

            I am trying to "combine" two lists into one cohesive list.

            In List 1, I have list items that are "empty"...
            November 30, 2015, 04:28 PM
          • The "official" RFO Wish List 2011
            Revitforum.org is proud to present the very first ”official” RFO Wish List! After months and months of suggesting new features, rating them,...
            February 14, 2012, 02:15 PM
          • key-values
            any easy way to process 2 lists into 1 key-values list just like dictionary in C#?
            list 1 is like {a, b, a, c, b, a}
            list 2 is like {1, 2,...
            January 25, 2017, 03:06 AM
          Working...
          X