Mapping multiple values to multiple elements


#1

Howdy all

I am creating a Room Data Sheets definition, i have completed pretty much all of it apart from what i thought would be the easiest section.
I have our RDS Excel template which i have added a macro to create a simple sheet for Dynamo to read. Dynamo then reads this tab and adds all the required parameters to the rooms in the project. I then add in the values from the excel file into the rooms (just default values) then once the proper data has been added into theese parameters within Revit, the values are exported back out into a tab in the original excel file, where i have another macro which creates a new sheet for each room and populates the data into the correct format. So far it works really well, here is where i am stuck:
I need to get the Room number, Level, Area, Perimeter and volume for each room, then populate this data into the new RDS parameters i created (with similar names). I cant seem to get it to work as expected and im having a brain fart!
I’ve had a look on the forums and cant find anything explaining the issue, but id appreciate anyone input or pointed to another post explaining this.
This is where I’ve ended up (see image below) I have tried a bunch of variations of this but cant get it to behave.

I’ve attached the Revit file with the RDS parameters, and a Dynamo definition with where i am. Any help is appreciated

Have used Revit 2017 and Dynamo v1.3

Once i have it all working i should be able to share the final definition with everyone. It will tie up with my other RDS definitions in this post: Create Elevation by Rooms

thanks in advance

RDS - Multiple values.dyn (10.9 KB)
RDS - Room Project1.rvt (3.0 MB)


#2

I don’t think you need List.Map here. You should be able to transfer parameter values directly from the String output to the SetParameterValue input.


#3

Hi @Alisder_Brown,

Is this what you are after?

I played a little with levels (and removed the crossproduct).

Edit: It’s not working as expected, maybe you can play some more with the levels (I have to leave now).

Kind regards,
Mark


#4

Hi @Alisder_Brown,

Sorry i was a bit in a rush on friday, and had no time left for proper testing.
I changed the levels of the “Element.SetParameterByName”, and think the parameters are now mapped correctly.


RDS - Multiple values_v03.dyn (5.5 KB)

Kind regards,
Mark


#5

Thanks @MJB-online
That seems to do the trick! Ill need to look into the levels a bit more for writing data.

Much appreciated :slight_smile:


#6

Good to hear this is working for you.

If you (and other readers) want more info on levels, check out the link below.
http://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/

Kind regards,
Mark