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













Must log in before commenting!
Sign Up