Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
if(sel.Elements.Size == 1)
{
System.Collections.IEnumerator es = sel.Elements.GetEnumerator();
es.MoveNext();
ImportInstance imp = es.Current as ImportInstance;
ExternalFileReference el = imp.GetExternalFileReference(); // errors here!!!
if (el != null)
{
directory = ModelPathUtils.ConvertModelPathToUserVisiblePath(el.GetAbsolutePath());
}
}I've been trying to get the file path of a DWG file that is linked into a Revit project. The code above always errors that the ImportInstance is not an external reference but I know the file is linked not imported.
Does anyone know what the difference between an Importinstance and an externalfilereference is?
Solved! Go to Solution.
Developer Advocacy and Support +