No announcement yet.

Import Excel Data to Revit Parameter Value Dynamo

  • Filter
  • Time
  • Show
Clear All
new posts

    Import Excel Data to Revit Parameter Value Dynamo

    Hi all,

    I'm a novice Dynamo user and have got stuck on a problem which doesn't seem too complicated - I might have missed something obvious.

    We've received an ironmongery schedule in excel, which matches an ironmongery code to a door number (mark). The door numbers exist in our model, the ironmongery codes do not. The ironmongery schedule does not cover all of the doors, so it's not a 'clean' matching list, there will need to be some comparing. I'd like the script to compare the lists, and when it finds a matching 'mark' value, it should add the corresponding 'ironmongery set' value.

    Could anybody offer any advice please? Here is what I have so far - I've got the lists that I need I just don't know where to go next. Any help appreciated!
    Attached Files

    You want to explore Union nodes (intersection) to compare your revit and excel lists...


      List.SetIntersection will tell you what doors are in both lists, but you will then still have to find the original door and the ironmongery set - that would probably work well if you set up a dictionary with the values initially, but I'm still learning how to work with those. I'd compare the lists using the List.AllIndicesOf node because I can directly take those results and write back the parameter. I'm sure there are other methods that are more efficient, but this should get you the desired result.

      Comparing lists in dynamo.png
      Julie Kidder
      Architect + BIM Director
      Hartman + Majewski Design Group


        jmk already mentioned it, but this is a prime example of dictionary work, read the excel file and make a Dictionary Mark - ironmongery Dictionary. Then get all the doors from the model, read their Mark and use Dictionary.ValueAtKey to read the corresponding Ironmongery.

        You will need something to catch the Doors with marks not in the excel otherwise you will get a bunch of error messages.

        This should be roughly what it looks like. Don't forget you can set the Watch Node as Output to report the undefined Doors if you use the Dynamo Player.



        Related Topics