Im new to the Revit API. I can get the Revit link instance using C# with the code below.
Element e = doc.GetElement(r);
if (e is RevitLinkInstance)
{
//Get revit link instance
RevitLinkInstance linkInstance = e as RevitLinkInstance;
LinkedDocument = linkInstance.GetLinkDocument();
//Do something
}
How do i get the LinkInstance using python. What i have tried so far.
element = doc.GetElement(ref)
if element is RevitLinkInstance:
linkInstance = #need to get link instance here#
linked_document = linkInstance.GetLinkDocument()
Would appreciate the help.