FilteredElementCollector links = new FilteredElementCollector(doc) .OfCategory(BuiltInCategory.OST_RvtLinks) .WhereElementIsNotElementType(); foreach (Element e in links) { if (e is RevitLinkType link) { var isLoaded = RevitLinkType.IsLoaded(doc, e.Id); ExternalFileReference EX = e.GetExternalFileReference(); var filePath = EX.GetAbsolutePath().ToString(); TaskDialog.Show("Info", $"名称:{e.Name};\r\n载入:{isLoaded};\r\n路径:{filePath}"); } }