I was trying to get the rooms at the points that I have created elevation tags by using one of ArchiLab nodes. However it gives me a strange warning message below:
" Warning: Select.GetRoomAtPoint operation failed.
The call is ambiguous between the following methods or properties: ‘Revit.Elements.ElementWrapper.Wrap(Autodesk.Revit.DB.RoofType, bool)’ and ‘Revit.Elements.ElementWrapper.Wrap(Autodesk.Revit.DB.FamilyInstance, bool)’ "
Are you on the latest version of Archilab? Could be an API call that’s changed and an older version of the package hasn’t differentiated between the two. Otherwise try the MEPover package, it has a node that does the same thing. You can also write the Python for it using the GetRoomAtPoint() method.
This code should work in a Python node if the input is a point or list of points:
# Made by Gavin Crump
# Free for use
# BIM Guru, www.bimguru.com.au
# Boilerplate text
import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
# Current doc/app/ui
doc = DocumentManager.Instance.CurrentDBDocument
# Define list/unwrap list functions
def uwlist(input):
result = input if isinstance(input, list) else [input]
return UnwrapElement(result)
# Preparing input from dynamo to revit
points = uwlist(IN[0])
rooms = []
# Do some action in a Transaction
for p in points:
getRoom = doc.GetRoomAtPoint(p.ToXyz())
rooms.append(getRoom)
# Preparing output to Dynamo
OUT = rooms