BIM World
A Professional BIM Learning Platform


Revit API: How to Access Linked CAD File Paths

The address of the linked CAD file cannot be retrieved using the Lookup method, which means conventional methods are unable to read this address.

To obtain the address, you need to use the following approach:

Reference reference = uiDoc.Selection.PickObject(ObjectType.Element, "Select the linked CAD file");
Element elem = uiDoc.Document.GetElement(reference);
CADLinkType type = uiDoc.Document.GetElement(elem.GetTypeId()) as CADLinkType;
string filePath = ModelPathUtils.ConvertModelPathToUserVisiblePath(type.GetExternalFileReference().GetAbsolutePath());
xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » Revit API: How to Access Linked CAD File Paths

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up