Announcement

Collapse
No announcement yet.

Dynamo List Sorting & Concatenating! I have the information, just wrong order! Help!!

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

    Dynamo List Sorting & Concatenating! I have the information, just wrong order! Help!!

    Hi i'm hoping someone can help me with this....?

    I have a basic schedule containing circuit information in revit like this...



    Ive done a dynamo script that gives me a list of the information i need to extract.



    what im trying to get to is a list that gives me the joined string of circuit number, rooms, comment.

    so based on the Revit schedule something reads like this:

    L11 - R.06/R.07/R.08/R.09/R.10/R.11 SP
    L12 - R.02/R.03/R.04/R.05/R.12/R.13 SP
    L21 - R.06/R.07/R.09/R.10/R.11 CL
    L31 - R.02/R.03/R.05/R.12/R.13 CL

    There are instances where there are 2 fixtures the same circuit in a room, but i dont want this room to be in the string twice.

    If anyone can help me with this i will be eternally grateful! i've wasting too much of my life on this already.

    Thank you in Advance!

    Script and revit file attached (2016).

    Attached Files

    #2
    A little trouble following exactly what you are attempting to produce, but

    How are you extracting the data from Revit via Dynamo. Are you extracting the Schedule or the element data?

    Are you using rooms or spaces?

    Have you looked at “grouping by key”

    If you want each element to be an unique value, you will need another value, as based on your current information you would end up with duplicates.

    What you may have to do is combine the room values separately and then insert them into your concatenated values.

    If you can provide more clarity, maybe a image of your full graph more assistance could be provided.


    Sent from my iPhone using Tapatalk

    Comment


      #3
      Hi Mengelmn,

      i'm extracting the element data into dynamo.

      im using spaces.

      what im trying to get to is the string of data mention in my OP, so i can push that back into another parameter as a circuit description.

      i do this normally by extracting the schedule into excel and sorting the data in there. but i wanted a more automated way without the excel export/import part.

      full image below...



      i have tried all sort, group by key, sort by duplicates, unique items.

      and i'm just getting round in circles getting variations of my final list..

      Thanks,

      Dan
      Attached Files

      Comment


        #4
        End of the day what you want is “circuit” + “list of spaces” + “comments”

        To do this you will need to first combine the “list” of spaces into a single value and then combine that with the circuit number and comments.

        Try grouping you list of space numbers by its circuit number, this should give you a list of the unique circuit numbers and a list of list containing the spaces. Each of the sub list you could then combine to a single value.

        Repeat the above with comments

        That should give you three equal list of equal length that you could then Combine to a single value.

        What this really means is you need to concat or combine your values multiple times to get to a single value.


        Sent from my iPhone using Tapatalk

        Comment


          #5
          Ok this is great! getting somewhere now!! thank you!

          i have my lists as you suggested (i think)...

          and now have a list of all the unique values that match the ones in the Revit schedule!



          now is there a way i can group together the rooms so the final string appears something like this..?

          L11 - R.06/R.07/R.08/R.09/R.10/R.11 SP
          L12 - R.02/R.03/R.04/R.05/R.12/R.13 SP
          L21 - R.06/R.07/R.09/R.10/R.11 CL
          L31 - R.02/R.03/R.05/R.12/R.13 CL

          instead of the 22 individual lines i have?
          Attached Files

          Comment


            #6
            Ok i managed to get the list to where i want it to be!

            i need to get this this to replace the values in this second list.

            i realise i can probably do this with a n export/ import from excel.

            but can it be done in dynamo without the excel step?

            i've tried a few nodes but all giving me errors.

            any thoughts on if i can do this, and how?



            Thanks,

            Dan
            Attached Files

            Comment


              #7
              Originally posted by landofdan View Post
              Ok i managed to get the list to where i want it to be!

              i need to get this this to replace the values in this second list.

              i realise i can probably do this with a n export/ import from excel.

              but can it be done in dynamo without the excel step?

              i've tried a few nodes but all giving me errors.

              any thoughts on if i can do this, and how?



              Thanks,

              Dan
              If you are looking to put this value back into Revit, then use the Set Parameter by Name block and you should be all set


              Sent from my iPhone using Tapatalk

              Comment

              Related Topics

              Collapse

              Working...
              X