Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get the Status of the Revit Link?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
903 Views, 2 Replies

How to get the Status of the Revit Link?

Links.PNGBy using the method RevitLinkType.IsLoaded() I can only tell whether or not the link is loaded (True or False). But is there a way to get the Status string?

Tags (2)
2 REPLIES 2
Message 2 of 3
jeremytammik
in reply to: Anonymous

What strings can possibly be displayed?

 

Just the three in your screen snapshot, or others as well?

 

Have you searched all the members?

 

https://www.revitapidocs.com/2020/4f035f8a-1314-99c2-a05a-f6d5bea0037a.htm

 

Have you checked all properties in RevitLookup?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3
naveen.kumar.t
in reply to: Anonymous

Hi @Anonymous ,

try using the below code

FilteredElementCollector coll = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RvtLinks).WhereElementIsElementType();
                foreach (Element e in coll)
                {
                    ExternalFileReference EX = e.GetExternalFileReference();
                    string linkStatus= EX.GetLinkedFileStatus().ToString();
                }

I hope this helps.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community