Dear All,
For a recent project, I created a dynamo script to automatize pipe insulation according to system name and pipe size. It’s working well and I’m happy with that.
What i would like to do is to update my workflow to an upper level of knowledges I don’t have yet.
My idea is to read multiple value from excel file.
I already managed to read one value from excel fil but multiple… it an other thing!
I want my script, for each pipe/pipe fitting in my project to collect 2 informations:
System abbreviation (let’s call it value “MA”)
Pipe/pipe fitting size (let’s call it value “MB”)
This is the easy part.
Next step: I want to search for MA then MB value and collect Type/Material and then the thikness value.
Once i have those values, it will be easy for me to set it into the elements throught the Set.Parmater.value.by.name node (already done many time).
Doe’s anyone have a tutorioal or node to point me to explore that?
In fact I’m stuck in the construction workflow as I don’t know how to compare 2 list: one with only 2 values (MA and MB) and the other one with 18 values (columns)
I tryed transposing list from my excel file but I’m not sure I’m on the right way…
I managed to read my excel file and to create one list for each system abbreviation i have.
I managed to extract all system abbreviation from my current revit file.
I’m now stucked to, according to the pipe’s system abreviation to go pick up the value inside the right sublist (reading from excel file).
You may use node List.IndexOf to find out which index of excel list is matching with every pipe’s system abbreviation.
And then you will be able to get excel data from other columns by using this list of indexes.
Thanks @Daniel_Hurtubise for the advice. I discover a new usefull node!
So, I managed to read my excel file and create dictionary by System abbreviation (and then all the values attached to them) _See bottom part of my script
On the other hand I managed to collect all elements in my model, returning their dimension and create a dictionnary by System abbrevation (keys) and values