Create wall by picking faces

Looking for some help from the experts.
I´m trying to create walls with python code, i already have the list of curves but i don´t know how to iterate the levels with “for” cycle (i think this is the problem), i have (example) 10 curves and 10 levels, i want to create one wall by it´s level with only one type of wall for all… So i have the next warning: “expected ElementId, got int”


@Raulmtzglez the error you are getting is irrelevant from looping through levels I believe, it is more related to calling the element Id as ID and not as an integer, now for looping through levels, using a Zip function will do that:

crvs = IN[0]
levels = IN[1]
wallType = IN[2]
result = []
TransactionManager.Instance.EnsureInTransaction(doc)
for crv, level in zip(crvs, levels):
	result.append(Wall.Create(doc, [c.ToRevitType() for c in crv], ElementId(wallType.Id), ElementId(level.Id), False))
TransactionManager.Instance.TransactionTaskDone()

OUT = result

1 Like

Nice…works fine for walls and floors, just a couple of questions, when i select a column or beam face or multiple faces in this elements at the same time to create walls, i don´t know why but seems dynamo puts this faces in the wrong place, i don´t know if its something about coordinate transform…
How do you create and offset input [3] in python?, ´cause when creating a wall on a floor, wall, column and beam by face, the profile des not work if the element has a base offsett