The problem is that I got the elements from the available files, collected the bounding.boxes, but it builds them according to the coordinates from the links and it turns out that it places all the boxes in one place, how can I pass the found coordinates from the available files to them? I read about the methods revitlinkinstance, gettotaltransform, but there c# is only c++, can this be implemented in Dynamo? Or I didn’t understand something. Thanks
If you want to get the TotalTransform with Python use this code from the internals of one of my Sastrugi nodes. Then use that with the OOTB Transform.Geometry nodes to move your Bounding Boxes
# Python coding credit to Dynamo Forum user - @Ewan_Opie 2019
# Sastrugi Package https://sites.google.com/view/sastrugi/home
import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.ImportExtensions(Revit.GeometryConversion)
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
def tolist(obj1):
if hasattr(obj1,"__iter__"): return obj1
else: return [obj1]
linkI= tolist(UnwrapElement(IN[0]))
TransactionManager.Instance.EnsureInTransaction(doc)
Ori = []
OvX = []
OvY = []
OvZ = []
transforms = []
for c in linkI:
ct = []
tF = c.GetTotalTransform()
transforms.append(tF)
oR = tF.Origin.ToPoint()
xV = tF.BasisX.ToVector()
yV = tF.BasisY.ToVector()
zV = tF.BasisZ.ToVector()
Ori.append(oR)
OvX.append(xV)
OvY.append(yV)
OvZ.append(zV)
TransactionManager.Instance.TransactionTaskDone()
OUT = Ori,OvX,OvY,OvZ,transforms