hello everyone,when i improt the RevitServices module,i get a error like this:
i’m sure that i have the dll file in my disk:
C:\Program Files\Dynamo\Dynamo Revit\2\Revit_2018\RevitServices.dll
and this my python code:
Import ProtoGeo
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
Import RevitAPI
clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *
Import DocumentManager and TransactionManager
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
Import ToDSType(bool) extension method
clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
doc = DocumentManager.Instance.CurrentDBDocument
app = DocumentManager.Instance.CurrentUIApplication.Application
#room list
roomElements = UnwrapElement(IN[0])
#Variables for collecting list
roomElems =
roomLocations =
roomNumbers =
roomNone =
for item in roomElements:
if area is placed then get stuff
if item.Area > 0:
location = item.Location.Point.ToPoint()
# assign your stuff to lists
roomElems.append(item)
roomNumbers.append(item.Number)
roomLocations.append(location)
else:
roomNone.append("Rooms not Placed")
List your stuff to the OUT variablez
OUT = roomElems, roomNumbers, roomLocations
i don’t know how to solve this issue,and i hope to get some help,thanks very much:smiley: