Edit
i have tried the following python script to get location , but i couldn’t convert it to point
import clr
clr.AddReference('RevitServices')
clr.AddReference('RevitNodes')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
link = UnwrapElement(IN[0])
loc=[]
doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)
for l in link:
loc.append(l.Location)
TransactionManager.Instance.TransactionTaskDone()
OUT = loc
thanks guys @SeanP@Alban_de_Chasteigner
this methods will return the project point of linked model, what i need to get the location of the link related to current project.
i managed to do that now through making a boundingBox for the link to get min or max value then i can deal with it
this is the script
import clr
clr.AddReference('RevitServices')
clr.AddReference('RevitNodes')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
link = UnwrapElement(IN[0])
view = UnwrapElement(IN[1])
loc=[]
bboxPts=[]
doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)
for l in link:
loc.append(l.get_BoundingBox(view))
bbox=l.get_BoundingBox(view)
bboxPts.append(bbox.Min.ToPoint())
TransactionManager.Instance.TransactionTaskDone()
OUT = bboxPts