Results 1 to 9 of 9

Thread: Sort Rooms list by separate list of room numbers

  1. #1
    Junior Member
    Join Date
    January 10, 2019
    Posts
    11
    Current Local Time
    02:55 AM

    Not allowed! Not allowed!

    Question Sort Rooms list by separate list of room numbers

    [FONT=Helvetica]I have a list of room numbers in a desired order, I need to get a list of room elements in the order of the room number list. NOT in order of room number. Specifically in the order of a list of room numbers (may not be sequential).

    [/FONT]
    [FONT=Helvetica]Thanks![/FONT]

  2. #2
    Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    96
    Current Local Time
    01:55 AM

    Not allowed! Not allowed!
    So you could pipe in all elements and look to see if they are in the list of all the rooms. This would add a lot of overhead because you would have to check each element IN THE MODEL against each room, which would be terrible.

    You could attempt to break down elements to a X,Y coordinate and then Rhythm has a node (I believe to just get a specific category). That would probably be faster.


    https://www.screencast.com/t/dZaeeSNSaii

    https://www.screencast.com/t/beWj9vTtevE
    Last edited by kraftwerk; August 4th, 2020 at 06:28 PM.

  3. #3
    Junior Member
    Join Date
    January 10, 2019
    Posts
    11
    Current Local Time
    02:55 AM

    Not allowed! Not allowed!
    Quote Originally Posted by kraftwerk View Post
    So you could pipe in all elements and look to see if they are in the list of all the rooms. This would add a lot of overhead because you would have to check each element IN THE MODEL against each room, which would be terrible.

    You could attempt to break down elements to a X,Y coordinate and then Rhythm has a node (I believe to just get a specific category). That would probably be faster.
    I don't think you've understood what I'm trying to do.

    I have a list of room numbers, for example:
    1. 101
    2. 105
    3. 110
    4. 108
    5. EL01
    6. 120
    7. 115
    8. S01


    Notice they aren't in order and some even have letters.

    I can get a list of Room elements (not elements in the room, the actual room element) and order them by Number, but it just does it alphanumerically. I need to be able to determine that order exactly like the Room Number list.

    The object is to get the room elements collected in that order and then insert values into the rooms' parameters that are also in that order.

    Hopefully that makes more sense.

  4. #4
    Senior Member
    Join Date
    May 14, 2012
    Location
    Where the plains meet the mountains
    Posts
    505
    Current Local Time
    12:55 AM

    Not allowed! Not allowed!
    How are you wanting to sort the rooms? Is there something in common, or a particular path? Ultimately, I'm thinking you need a separate room parameter that you manually assign and order to it, then use that to sort your list, rather than room number sequence.

  5. #5
    Junior Member
    Join Date
    January 10, 2019
    Posts
    11
    Current Local Time
    02:55 AM

    Not allowed! Not allowed!
    I'm trying to copy a calculated field to another field in a schedule. The rooms in the schedule are ordered by level and then room number.

    I can sort the room elements in Dynamo by level and room number, but that order is different than in the schedule. The schedule does level by HEIGHT and not by alphanumeric like Dynamo does. That's the big problem.

    So, when I grab the calculated field values, I also grab the room numbers that have the same sorting. I end up with a list of room numbers and the associated calculated values in the same order, but I need to then get the room elements in the same order so I can set the value of the empty field.

  6. #6
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    3,387
    Current Local Time
    01:55 AM

    Not allowed! Not allowed!
    Is your Room List a Revit schedule?
    If so, how do you have that sorted? You should be able to sort your "elements" (are you talking about equipment?) that same way

    Depending on what type of Revit element you're counting, you should be able to simply include the Room Name & Number in your Schedule
    Just use the "Select available fields from" dropdown and select Rooms
    Here's an example of our Furniture Schedule
    Click image for larger version. 

Name:	Furniture Schedule.PNG 
Views:	10 
Size:	11.0 KB 
ID:	39213

  7. #7
    Junior Member
    Join Date
    January 10, 2019
    Posts
    11
    Current Local Time
    02:55 AM

    Not allowed! Not allowed!
    See my previous post. Hopefully also answers the question you're asking.

  8. #8
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,578
    Current Local Time
    12:55 AM

    3 Not allowed! Not allowed!
    While there may be other ways of handling what you want, I think this will serve the purpose.

    Get the rooms, and their room numbers, get the indices where they match, then get the room element at the index.

    Click image for larger version. 

Name:	Reorder Rooms.png 
Views:	27 
Size:	110.8 KB 
ID:	39214

  9. #9
    Junior Member
    Join Date
    January 10, 2019
    Posts
    11
    Current Local Time
    02:55 AM

    Not allowed! Not allowed!
    Quote Originally Posted by jmk View Post
    While there may be other ways of handling what you want, I think this will serve the purpose.

    Get the rooms, and their room numbers, get the indices where they match, then get the room element at the index.
    EXCELLENT. Exactly what I needed. THANK YOU!

Similar Threads

  1. Creating rooms from a list
    By jmk in forum Dynamo BIM
    Replies: 2
    Last Post: April 25th, 2017, 03:16 PM
  2. Replies: 0
    Last Post: January 31st, 2017, 11:15 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, 02:41 PM
  4. Replies: 0
    Last Post: March 12th, 2015, 06:16 AM
  5. List an opening space only in the finish schedule without listing imaginary rooms
    By rabbitcookies in forum Architecture and General Revit Questions
    Replies: 8
    Last Post: November 20th, 2014, 03:48 PM

Tags for this Thread

Posting Permissions

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