Assign room numbers to equipments

Hi all,

I am trying to find the equipment present in a room and assigning that room number to the elements within that room. I have linked my architectural model into mechanical model. But when I try to get linked elements into dynamo they are not in correct place where I can see them in correct position in revit. So kindly let me know how do I transform or convert the linked model to the correct position to get room numbers.

Here is the instance showing the wrong location imported in dynamo.

Following is the working script.

Kindly let me know where I am missing or what should I do to go ahead ?

Did you have a look here?

1 Like

I got it my self using the node called “Linkelement.ofcategory” from bimorphNodes which will give me transfomed located elements with respect to current project.
image

Thanks @bvs1982. I have taken a look at the post.

To add some context to what is going on specifically, link instance all contain a transform which you can access to orient geometry from linked objects to the native coordinate system in the active model.

Below is an example I did just a few minutes ago to take a linked floor, get its points and orientate them to a local model to make a topo in the same position from them.

The code I use in Crumple to get the transform is below:

# Made by Gavin Crump
# Free for use
# BIM Guru, www.bimguru.com.au

# Boilerplate text
import clr

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import RevitLinkInstance

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

# Get link transform
link_instance = UnwrapElement(IN[0])
link_transform = link_instance.GetTotalTransform().ToCoordinateSystem(True)

# Preparing output to Dynamo
OUT = link_transform

1 Like

Thanks @GavinCrump I appreciate that. This is also working for me. Thanks alot for your time.

1 Like