Hi everyone!
I’m trying to create a wall using a curves like profile. But I got a Exception " Failed to create the wall"
If you can help me, I’ll appreciate you.
Thanks.
import clr
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import System
from System import Array
from System.Collections.Generic import *
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
from Revit import GeometryConversion
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = uiapp.ActiveUIDocument
Curves = IN[0]
TransactionManager.Instance.EnsureInTransaction(doc)
RVTCurves=[]
for i in Curves:
A=[]
RVTCurves.append(A)
for j in i:
A.append((j.ToRevitType()))
walls=[]
for i in RVTCurves:
walls.append(Wall.Create(doc,i,True))
#wall=Wall.Create(doc,RVTCurves,True)
TransactionManager.Instance.TransactionTaskDone()
OUT = walls