Hallo, I want to add area loads to my wall elements, but Im getting a managed exception by python can anyone help me out.
cheers.
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB.Structure import *
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Analysis import *
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
areaLoad = []
host = UnwrapElement(IN[0])
force = IN[1].ToXyz()
typee= UnwrapElement(IN[2])
TransactionManager.Instance.EnsureInTransaction(doc)
hostAnlytical = []
analyticalSurface = []
# getting the Analytial models of the walls.
for i in host:
hostAnlytical.append(Element.GetAnalyticalModel(i))
areaLoad = AreaLoad.Create(doc, hostAnlytical, force, typee)
TransactionManager.Instance.TransactionTaskDone()
OUT = areaLoad