#RVT links
rvt_links = FilteredElementCollector(doc).WhereElementIsNotElementType().OfClass(RevitLinkInstance).ToElements()
siteCategoryfilter = ElementCategoryFilter(BuiltInCategory.OST_ProjectBasePoint);
check_links = ""
coordinates = []
for rvt_link in rvt_links:
active_doc = rvt_link.GetLinkDocument()
if active_doc:
siteElements = FilteredElementCollector(active_doc).WhereElementIsNotElementType().WherePasses(siteCategoryfilter).ToElements();
positions = []
for ele in siteElements:
x = ele.ParametersMap.get_Item("E/W")
Hi Frederik,
Have you tried using Revit Lookup? It could be helpful for you to uncover the parameter that you need.
Hey thanks. The funny thing is, when i select the project base point of the link, the LinkInstance is selected.
So the only option for me now is to load the linked file in another Revit and to execute the OST_ProjectBasePoint parameter in that newly opened file.
Or find another way to find the position of the link.
Any suggestions are welcome.
I found another thing:
It seems like the parameters ("E/W") in the Project Base Point of the link do not exist.
When i ran this code in the native doc:
for param in bp.Parameters:
param_name = param.Definition.Name
print("parameter", param_name)
I get these parameters:
not sure if this helps, but from RevitLinkInstance you can get the link Document using GetLinkDocument(). After, you can retrieve ProjectLocations by Document.ProjectLocations following by projectLocation.GetProjectPosition(XYZ.Zero). You can then access required properties like EastWest, NorthSouth & Elevation.
See here
Can't find what you're looking for? Ask the community or share your knowledge.