RevitLinkInstance Get Or Set Location

Dears,
im trying to get a location of RevitLinkInstance , or set a location so i can put them in specific point in my model

but the GetLocation & SetLocation won’t work , if you have the proper solution for that it would be appreciated
thanks

Edit
i have tried the following python script to get location , but i couldn’t convert it to point

image

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

See if this post can help you.

Hi @khuzaimah.ElecEng,

This node could help you.
Project%20location

2 Likes

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

thanks guys again for your help