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

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

Shai.Nguyen
Advocate Advocate
845 Views
1 Reply
Message 1 of 2

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

Shai.Nguyen
Advocate
Advocate

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.

0 Likes
846 Views
1 Reply
Reply (1)
Message 2 of 2

Chuong.Ho
Advocate
Advocate

ChuongHo_0-1628241922946.png

Demo : 

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

Chuong Ho

EESignature

0 Likes