No announcement yet.

use a list extract as individual input for a calculation?

  • Filter
  • Time
  • Show
Clear All
new posts

    use a list extract as individual input for a calculation?

    Hi Guys,

    As I'm a newbie to dynamo I came across something I can't figure out.
    I checked out multiple forums, blogs, vlogs and other internet sources for an answer, but nothing unfortunately.

    My 'problem' is that I would like to use each of the 4 results from the box 'element.GetparameterValuebyName' as an individual input for the next part of my calculation.
    Now I'm using a code block, and thus have to enter each result manually and run it's calculation.
    But it would be awesome if it can be done automaticly by linking the "list" to the "searchFor"-box.

    Hopefully you guys can give me some pointers if it is possible and if yes, how.

    Attached Files

    I'm not sure I understand what your end goal, but you could try searching for "list lacing" or "replication guides". That's how to control how the nodes interact with multiple and mismatched inputs. Here's a link from the primer:
    What's a List | The Dynamo Primer

    Looking at your graph, if you are only changing the code block to the values retrieved by Element.GetParameterValueByName, the net effect is that you are still iterating through those same results (just manually). Which sounds like it might be a list management issue.
    Chris Ellersick


      Hi Chris, thanks for your reply. I will search for the tips you gave me.

      My goal is that I want to use each of the single numbers (it is basically an area instance parameter in revit) as an input to start a calculation.
      I want the calculation-result to set as an instance parameter into other area;'s (which contains the same number in it's own number) into Revit.
      Basically should the result in Revit be to add the sum of multiple area's into another area. All based upon the reccurence of a number.
      I hope this explanation makes it more clear to what my goal is?!

      Hereby the complete schedule as I have build so far:
      (ps1. sorry for some of the dutch words in it, I don;t know how exactly it is named in english)
      (ps2. the orange groups in the schedule have no function other than that I wanted to check what the number of the resulting object was)
      Attached Files


        I took a look at this and here is what I understood from your workflow (correct me if I missed something):

        So what I did is reproducing it in a simple way to show how it could work. I used rooms in place of your "GBO Areas" and walls in place of "VG Areas", aiming to set the sum of walls areas to a room parameter, with lists sorted by the Comments parameter value which stands for your "Number" parameter. Seems complicated but finally not so much. Here is the result:

        What is essential is to maintain consistency between lists, so that the right parameter value can be set to the right element.
        Attached Files


        Related Topics