Set Type Parameter from excel in revit

dynamo

#1

Hi,
I want to fill the parameter Assembly Code into the diferent types of walls from an excel file in dynamo, but I need to control the ID of the elements because the result is that dynamo read all types of walls even without being modeled and in order of their ID so I finally get some assembly codes that dont match with my walls.

I created a definition that get the correct list of walls bus I cant join " item " with " element ".
Could you help me??


Set Parameter for every element
#2

Can you show what your error is?

I believe you are trying to put that number into the element input, and getting your error, like this:

You could try calling the element associated with that number. An element inputs, but the id does not.
The best solution would be just inputting an element straight into the node solving your problem:


#4

Hi @mariaeugenialph,

I have no experience with writing assembly code to element types, but from what i have read here on the forum it can only be set with python code.
See the below thread:
https://forum.dynamobim.com/t/set-assembly-code-file/10610?u=mjb-online

I hope it can help you to solve your problem.

Kind regards,
Mark


#5

Thanks for your help!!
My problem is that when I connect the node “listGetItemAtIndex” with “ElementSetParameterByName” cant work and I dont know why… only works when I join “all Elements of type” directly with “ElementSetParameterByName”. Maybe the reason is that I cant join “item” with “element” ?¿


#6

The node ElementSetParamaterByName needs ElementID not string. This what appears to me from the image above even though it looks like you feeding elementid.

You can also try to review below topic and see if you can apply to your query and may solve your issues having

Thanks


#7

Are you setting it up the way I have it, from All Elements of Type to List.GetItemAtIndex to Element.SetParameterName? Do not connect it to Element.ID


#8

I Know but if I connect "AllElementoftype directly with “ElementSetparameterbyname” dosent work the way I want because it takes the assembly codes it wants, especifically according to the order of elemnt ID so what I get in Revit its a wall schedule with modelled walls and assembly codes that doesnt belong to those walls…
So I need a way to say dynamo relate only the walls modelled with the correct assembly codes…


#9

Thank you!

I get what I want!
The thing was to eliminate “Element ID” and connect “Watch” with “GetItemAtIndex” and It works!!
The only thing I dont like is that I have to specify in CodeBlock the order of each wall to get the correct assembly code. I will try to filter the schedule in revit to get only the types of walls to avoid getting duplicated types…

You can find the result here:


#10

I would say thank all of you for the help!!


#11

No probs dont forget to mark solve…


#12

That is what I was saying to do. look at my image from my first post again,

I also said to connect AllElementsOfType to the List.GetItemByIndex then to the “elementSetParameterByName”
-Quoting previous post “Are you setting it up the way I have it, from All Elements of Type to List.GetItemAtIndex to Element.SetParameterName? Do not connect it to Element.ID


#13

@Yna_Db
I replayed with an answer i got. Thanks for all!


#14

I had a similar scenario! Thankfully @jakethalacker7’s node and the last result by @mariaeugenialph solved my issue…!