Wall by profile Problem - Help!

Hi, everyone!

I’m building a code to create column’s formwork but when I create a wall by profile and sometimes this profile is a rectangular profile. I got a not edited profile wall.

I’m not sure what is happening. This only happen when profile is a rectangular profile.

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

clr.AddReference('System')
from System.Collections.Generic import List

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

#Preparing input from dynamo to revit
element = UnwrapElement(IN[0])
MuroEncofrado = UnwrapElement(IN[1])
Nivel = UnwrapElement(IN[2])


#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)

#Lista con las curvas de los muros de tipo "RevitType"
CurvasRevit=[]
for i in element:
	A=[]
	for j in i:
		A.append(j.ToRevitType())
	
	CurvasRevit.append(A)

Muros=[]

for i in CurvasRevit:
	Muros.append(Wall.Create(doc, i, MuroEncofrado.Id,Nivel.Id,False))

for i in Muros:
	WallUtils.DisallowWallJoinAtEnd(i,0)
	WallUtils.DisallowWallJoinAtEnd(i,1)

TransactionManager.Instance.TransactionTaskDone()

OUT = Muros
1 Like

Hi @JrGomez and welcome, if you check the Revit API method you are using to create the wall, it is mentioned that it creates a non-rectangular profile wall:
https://www.revitapidocs.com/2020.1/8d651eae-ae63-bc50-5f43-383d71ec4301.htm
Try to use another method for rectangular formworks.

You’re using a method to create walls by location line. This method doesn’t specify the wall’s height and it isn’t the method that creates walls by profile which requires an Ilist of curves.
see the different methods here:
https://www.revitapidocs.com/2020.1/3ef7e31c-b41b-c8cc-2713-8f098954613d.htm