I am trying to create a mark beam list like image
Someone can help me
I’m not sure what you want to count here. The beams based on the Mark-parameter?
I I have filtered beams of the same length and type and I want to Mark - parameter type it with the same name
Please see result like image
I think Count might be the wrong thing but what he wants is for Element.SetParameterByName to have all of the elements in each nested list to be set to the same value in the DS# list according to the index of the nested list. As in, all of the elements in the first nested list to be DS1, all of the elements in the second nested list to be DS2, etc.
As I don’t have access to your revit project, I can’t test this but you can try this script in a python node:
import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * clr.AddReference('RevitNodes') import Revit clr.ImportExtensions(Revit.Elements) #The inputs to this node will be stored as a list in the IN variables. elements = IN paramName = IN values = IN for i in range(len(elements)): for j in elements: j.SetParameterByName(paramName,values[i]) #Assign your output to the OUT variable. OUT = elements
Use this python script to replace the Element.SetParameterByName node, make sure you increase the inputs on the python node to 3 (up to IN), and connect in the same order. Let me know if it works or if any errors pop up.
Sorry, I mistyped one line. Replace for j in elements: to
for j in elements[i]:
What is the error? And is it possible to post your Revit and Dynamo files?
I am assuming you are using Revit 2018? I cannot open the file in my 2017, so I cannot fix the python node for you. Can you copy and paste what the error message is in the python node? More than just “on line 14”
I tried this on the sample structural plan that comes with Revit so no promises but I got this to work.
V4.dyn (12.5 KB)
Hello there Bach.
Try doing these changes to your graph:
You can also solve it by using the RIE.IndexDuplicateStrings node:
If you don’t need to keep the list structure, you dont really need the chop node.
Iterating through list
No problem, glad it worked!