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 know path link of Revit Link Instance in case Link is unload?

1 REPLY 1
Reply
Message 1 of 2
Shai.Nguyen
532 Views, 1 Reply

How to know path link of Revit Link Instance in case Link is unload?

Hi everyone,

I have a question. I tried to access the path of Revit Link Instance if the Link file is not loaded (in some reasons).

question1.PNG

I used: RvtDocument doc = rvtlink.GetLinkDocument(); But when I debug, doc is null so I can't get doc.PathName.

question2.PNG

I tried to reload in Revit, and Revit still remember the old path of Link.

question3.PNG

How can Revit get this Path and where can I get that?

Thank you in advanced. Your solution is highly appreciated.

1 REPLY 1
Message 2 of 2
Chuong.Ho
in reply to: Shai.Nguyen

ChuongHo_0-1628241922946.png

Demo : 

IDictionary<ExternalResourceType, ExternalResourceReference> resourceReferences = RevitLinkType.GetExternalResourceReferences();
resourceReferences.Values.First().InSessionPath;

Chuong Ho

EESignature

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