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: 

Get links in active document

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
ottosson_mathias
3786 Views, 3 Replies

Get links in active document

I want to get all the linked files of the active document. But when I use a FilteredElementCollector with OfClass RevitLinkType I get all opened documents and their linked files! I only want the linked files of the current document. Not the the open document, just links 🙂

 

var links = new FilteredElementCollector(document).OfClass(typeof(RevitLinkType));

 

If not possible, how can I determine if the RevitLinkType in my filteredElementCollector is from the current document?

 

Thanks!

3 REPLIES 3
Message 2 of 4

Does this previous thread answer your question?

 

https://forums.autodesk.com/t5/revit-api-forum/find-revitlinks-is-loaded-or-unloaded/td-p/6819396

 



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

Message 3 of 4

Thanks Jeremy, it helped med to continue my search where I found this post which did exactly what I needed: https://forums.autodesk.com/t5/revit-api-forum/getlinkdocument-broken-in-2020/m-p/9385210.

 

Is it just me or is it difficult to get good search results on this forum search?

Message 4 of 4

Thank you for the additional link.

  

I totally agree that it is difficult, and that applies to just about every search engine I know.

  

Typepad is much worse.

  

Google and DuckDuckGo seem to provide decent results.

  

I just implemented my own full-text search, and that is not perfect either, as it stands now: 

  

https://thebuildingcoder.typepad.com/blog/2020/09/optimising-parameters-and-full-text-search.html

  

Maybe you really need a bit of natural language processing (NLP) to be able to achieve really good functionality.

  

And with the speed at which that technology is currently advancing, I think much better results than we are used to should be achievable today without too much effort.

  



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

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

Post to forums  

Rail Community


Autodesk Design & Make Report