Hi guys,
I’ve been trying to sort some family types from wall sweeps on a project, to set specific values for the same parameter, but I’m not getting there. This is my roadmap to create this script:
_1st: collect all Wall Sweep types in project;
_2nd: filtering the wall sweep types, based on its names;
_3rd: Sorting the collected wall sweeps by element type names;
_4th: setting the parameter value based on a list already sorted by element type name (in excel but in this sample I made it with a code block).
The struggle here, has being that I cannot get the elements already sorted by name.
The last node is expecting elements (not a string) but in the filter list, it is sorted by ID (not by name).
I’m sending the script sample as well as a RVT sample.
Does anyone know how can it be solved?
Thank you in advance! Set parameter for System Familytype list.dyn (20.8 KB) Project1.rvt (352 KB)
Change the order of the descriptions in the code block aswell
and as @dineshsubramani says , its a type parameter, get it by using Element.Element.Type before the SetParameter node.
Hi Marcel, thank you for your answer.
The ListFilterByBoolMask is ordering the elementTypes by its ID, that’s why I need to sort it first by name before set its parameter value. The tricky part here is, once this is just a sample, i cannot change the code block order. Instead of a code block, I will use an excel file with a lot of elements values that makes it impossible to change the order one by one.
You could use a dictionary to pull the values?
See it as a list with counterparts.
Feed it 1 and you’ll get A
Feed it 2 and you’ll get B
and so on
You can create a dictionary with list comming from excel
Thank you again Marcel.
Honeslty, I’ve never worked with dictionary in dynamo. I will try to figure out how it can be helpul in this situation and hope to get some solution to post here.
I met same problem. I also follow this instruction But iit didn’t work. My input for element in " Element.SetParameterByname is not correct "
How to fix it ? thank you
sure. I can add for wall categorie, But I only wanna set value parameter for some kind of family type. It is doesn work. Do you know how to solve this problem ?