New Dynamo user here.
I’m really lost on what i’m trying to do so I hope you will maybe help me for finding the good way of doing it…
On my Revit project, I need to add a lot of shared parameter who are all link to a unique special code name “CP_ISIS”.
For exemple, If my CP_ISIS parameter is “ABCD”, parameter “XXX1” will always be the same, parameter “XXX2” too,…
The way I was trying to doing it was that way :
Find CP_ISIS in my category
Filter each different version of it
Use that element filter for adding like 4 predetermined string to 4 another parameter of that category
Doing it for each version of CP_ISIS.
I will be able to modify only that CP_ISIS parameter and every other link parameter will be good after running the script.
Currently, have been only able to filter my CP_ISIS parameter but I dont know how to use it for been able to select the other shared parameter of the category who got that CP_ISIS.
I would suggest building and reading an excel file where one column is your CPIS value and the other is the value it should generate. We often call this process ‘mapping’ in data management, or sometimes a ‘lookup’ if you’re familiar with the concept in Excel, for example.
You can then use list.indexof to ask a CPIS parameter value where it occurs in the excel column in Dynamo, then list.getitematindex to get that row/index from the other list.
With Excel & list.getitematindex, I was able to have a list per line with all my columns.
But I wasn’t able to find how to filter the “if”.
Currently, i’m doing it that way :
All elements > Get their CPISIS value > filter each value == ABCD,… but I need to copy each following value by myself.
If I’m using the Excel way, i need to find how doing the CPISIS filter and after been able to get the good value from the other column.
I tried with list.indexof but I got only -1 value so i’m not doing it properly.
You’d benefit from looking into list levels, filtering is not always the best approach, especially if dealing with an unknown number of parameters in a data set.
The below script takes an excel file and filters down to elements with a CPIS parameter value found in column A, then sets the parameters in the header row with the values found in the same row. It is built in Revit 2023, but uses fairly fundamental techniques and nodes. If you are dealing with type parameters, then the node from Rhythm you are using is a good one, but my script assumes all instance parameters which are able to vary by group instance.
There are probably some shorter steps you can take using list levels and drop items, I’ve relied pretty heavily on deconstruct and transpose to save myself some time as I had limited time to make the script.