<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: External Resource Server can't load linked IFC in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/13826269#M84739</link>
    <description>&lt;P&gt;Appologies, disregard I have found this post for&amp;nbsp;RevitLinkType.UpdateFromIFC. Which solves my issue.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/reloading-ifc-link/td-p/8589091" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/reloading-ifc-link/td-p/8589091&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Sep 2025 02:26:57 GMT</pubDate>
    <dc:creator>Rockit_for_Revit</dc:creator>
    <dc:date>2025-09-26T02:26:57Z</dc:date>
    <item>
      <title>External Resource Server can't load linked IFC</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/11064105#M20020</link>
      <description>&lt;P&gt;Hi, I'm trying to implement an ExternalResourceServer to link files from a users Onedrive folder.&lt;/P&gt;&lt;P&gt;We use sharepoint to store project documents, including some IFC and DWG files and access these documents via Onedrive in windows. This means every user has their own unique path to the files, ie c:\Users\username\Onedrive - CompanyName\Project\...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For testing purposes I just replace "c:\Users\username\Onedrive - CompanyName\" with the environment variable %onedrive% which points to the correct folder and&amp;nbsp;so far I'm able to link DWG and Revit files without any problems, but it fails when I try to link IFC files. For the user that links the IFC, it works just fine, but for any other users trying to load the link, I get this error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sveinhorve_0-1648371125286.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1046636i73E11B9D2F4DB51C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sveinhorve_0-1648371125286.png" alt="sveinhorve_0-1648371125286.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Revit 2022.1 and the revit ifc importer from github version 22.4.1.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I compare the RevitLinkType for a normal revit file and the ifc link, I see some differences in "GetExternalResourceReferences".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the normal revit file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sveinhorve_1-1648371910870.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1046638i5773F1B18E4CBB5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sveinhorve_1-1648371910870.png" alt="sveinhorve_1-1648371910870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linked ifc model:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sveinhorve_2-1648371970146.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1046639i8CA133F1F767AB66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sveinhorve_2-1648371970146.png" alt="sveinhorve_2-1648371970146.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The linked ifc has full path in the InSessionPath, is this why it fails?&lt;/P&gt;&lt;P&gt;Do I have to treat IFC files different, or is this a bug, or not related?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public class OneDriveExternalResourceServer : IExternalResourceServer
{
    // Implementation
    public OneDriveExternalResourceServer() { } // Constructor
    public Guid GetServerId() =&amp;gt; new Guid("4B386D14-5D9E-4611-BCDA-56091BE3AEBF");
    public ExternalServiceId GetServiceId() =&amp;gt; ExternalServices.BuiltInExternalServices.ExternalResourceService;
    public String GetName() =&amp;gt; "Onedrive";
    public String GetVendorId() =&amp;gt; "Vendor";
    public String GetDescription() =&amp;gt; "Map path to users onedrive folder";
    public String GetShortName() =&amp;gt; "Onedrive";
    public virtual String GetInformationLink() =&amp;gt; "";
    public string GetIconPath() =&amp;gt; string.Empty;
    public bool SupportsExternalResourceType(ExternalResourceType resourceType) =&amp;gt; (
        resourceType == ExternalResourceTypes.BuiltInExternalResourceTypes.CADLink ||
        resourceType == ExternalResourceTypes.BuiltInExternalResourceTypes.RevitLink ||
        resourceType == ExternalResourceTypes.BuiltInExternalResourceTypes.Image ||
        resourceType == ExternalResourceTypes.BuiltInExternalResourceTypes.PointCloud ||
        resourceType == ExternalResourceTypes.BuiltInExternalResourceTypes.IFCLink
        );
    private static string RefMapLinkPathEntry =&amp;gt; "Path";

    public void LoadResource(Guid loadRequestId, ExternalResourceType resourceType, ExternalResourceReference desiredResource, 
        ExternalResourceLoadContext loadContext, ExternalResourceLoadContent loadContent)
    {
        if (loadContent is LinkLoadContent linkLoadContent)
        {
            string serverLinkPath = GetFullServerLinkFilePath(desiredResource);
            ModelPath linksPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(serverLinkPath);
            linkLoadContent.SetLinkDataPath(linksPath);
            loadContent.LoadStatus = ExternalResourceLoadStatus.Success;
        }
        else
        {
            throw new ArgumentException("Wrong type of ExternalResourceLoadContent (expecting a LinkLoadContent) for Revit links.", "loadContent");
        }
    }

    public bool IsResourceWellFormed(ExternalResourceReference extRef)
    {
        if (extRef.ServerId != GetServerId())
            return false;
        if (!extRef.HasValidDisplayPath())
            return false;
        return true;
    }

    public string GetInSessionPath(ExternalResourceReference reference, string originalDisplayPath)
    {
        return originalDisplayPath;
    }

    public ResourceVersionStatus GetResourceVersionStatus(ExternalResourceReference reference)
    {
        return ResourceVersionStatus.Unknown;
    }

    public bool AreSameResources(IDictionary&amp;lt;string, string&amp;gt; reference1, IDictionary&amp;lt;string, string&amp;gt; reference2)
    {
        if (reference1.Count != reference2.Count)
        {
            return false;
        }
        else
        {
            foreach (string key in reference1.Keys)
            {
                if (!reference2.ContainsKey(key) || reference1[key] != reference2[key])
                {
                    return false;
                }
            }
        }
        return true;
    }

    public void SetupBrowserData(ExternalResourceBrowserData browserData)
    {
        ExternalResourceMatchOptions matchOptions = browserData.GetMatchOptions();
        ExternalResourceType resourceType = matchOptions.ResourceType;

        string OneDrivePath = Environment.GetEnvironmentVariable("onedrive");
        if (!Directory.Exists(OneDrivePath))
            throw new Exception("Onedrive path is invalid");

        string filterPattern = "*";
        string folderPath = browserData.FolderPath.Replace('/', '\\');
        string path = OneDrivePath.TrimEnd('\\') + folderPath;
        if (Directory.Exists(path))
        {
            DirectoryInfo dir = new DirectoryInfo(path);
            DirectoryInfo[] subDirs = dir.GetDirectories();
            foreach (DirectoryInfo subDir in subDirs)
            {
                browserData.AddSubFolder(subDir.Name);
            }
            FileInfo[] subFiles = dir.GetFiles(filterPattern, SearchOption.TopDirectoryOnly);
            foreach (FileInfo file in subFiles)
            {
                var refMap = new Dictionary&amp;lt;string, string&amp;gt;();
                refMap[RefMapLinkPathEntry] = folderPath.TrimStart('\\').TrimEnd('/') + '/' + file.Name;
                browserData.AddResource(file.Name, GetFileVersion(file.FullName), refMap);
            }
        }
        else
        {
            throw new ArgumentException("Path is invalid");
        }
    }

    public void GetTypeSpecificServerOperations(ExternalResourceServerExtensions extensions)
    {
        //RevitLinkOperations revitLinkOps = extensions.GetRevitLinkOperations();
        //revitLinkOps.SetGetLocalPathForOpenCallback(new GetLinkPathForOpen());
    }

    //

    private string GetFileVersion(String filePath)
    {
        FileInfo fileInfo = new FileInfo(filePath);
        DateTime lastModifiedTime = fileInfo.LastWriteTimeUtc;
        return lastModifiedTime.ToString();
    }

    private string GetFullServerLinkFilePath(ExternalResourceReference resource)
    {
        if (resource == null)
            throw new Exception("Invalid ExternalResourceReference");

        IDictionary&amp;lt;string, string&amp;gt; refMap = resource.GetReferenceInformation();
        if (!refMap.ContainsKey(RefMapLinkPathEntry))
            throw new Exception("ExternalResourceReference missing Path key");

        string refLink = resource.GetReferenceInformation()[RefMapLinkPathEntry].Replace("/", "\\").Replace(@"\\", @"\");
        string OneDrivePath = Environment.GetEnvironmentVariable("onedrive");
        string fullPath = Path.Combine(OneDrivePath, refLink);

        if (!File.Exists(fullPath))
            throw new Exception($"File: {fullPath} not found");

        return fullPath;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 09:40:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/11064105#M20020</guid>
      <dc:creator>svein.horve</dc:creator>
      <dc:date>2022-03-27T09:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: External Resource Server can't load linked IFC</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/11065877#M20021</link>
      <description>&lt;P&gt;Thank you for reporting this and your clear description. I am &lt;A href="https://autodesk.slack.com/archives/C0SR6NAP8/p1648478509864299" target="_blank"&gt;checking&lt;/A&gt; with the development team for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 14:43:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/11065877#M20021</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-03-28T14:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: External Resource Server can't load linked IFC</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/11083551#M20022</link>
      <description>&lt;P&gt;Dear Svein,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your report, sample material and patience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The development team reply: I am hoping that this is possible to do and we only need to provide code sample.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consequently, I submitted an internal development ticket &lt;U&gt;&lt;STRONG&gt;REVIT-190078&lt;/STRONG&gt;&lt;/U&gt; [External Resource Server can't load linked IFC] for their further exploration. Please make a note of this number for future reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are welcome to request an update on the status of this issue or to provide additional information on it at any time quoting this change request number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue is important to me. What can I do to help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue needs to be assessed by our engineering team and prioritised against all other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Impact on your application and/or your development.&lt;/LI&gt;
&lt;LI&gt;The number of users affected.&lt;/LI&gt;
&lt;LI&gt;The potential revenue impact to you.&lt;/LI&gt;
&lt;LI&gt;The potential revenue impact to Autodesk.&lt;/LI&gt;
&lt;LI&gt;Realistic timescale over which a fix would help you.&lt;/LI&gt;
&lt;LI&gt;In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 08:24:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/11083551#M20022</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-04-05T08:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: External Resource Server can't load linked IFC</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/13826256#M84738</link>
      <description>&lt;P&gt;It seems that an IFC link is represented by&amp;nbsp;RevitLinkType even though its IFC.&lt;/P&gt;&lt;P&gt;In revit 2026 I tried both methods to reload the ifc model via&amp;nbsp;RevitLinkType.LoadFrom.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim ModelPath As ModelPath =
ModelPathUtils.ConvertUserVisiblePathToModelPath(ifcPath)
RevitLinkType.LoadFrom(ModelPath, Nothing)'No luck

Dim objExternalResourceType As ExternalResourceType = ExternalResourceTypes.BuiltInExternalResourceTypes.IFCLink
Dim objExternalResourceReference As ExternalResourceReference = ExternalResourceReference.CreateLocalResource(activeDBdoc, objExternalResourceType, objRockitLinkItem.ModelPath, PathType.Absolute)
RevitLinkType.LoadFrom(ExternalResourceReference, Nothing)'No Luck&lt;/LI-CODE&gt;&lt;P&gt;However on both methods I recive an exception error,&amp;nbsp; 'The input "path" does not represent a Revit model.'&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please an you assist or provide any workaround?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2025 02:09:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/13826256#M84738</guid>
      <dc:creator>Rockit_for_Revit</dc:creator>
      <dc:date>2025-09-26T02:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: External Resource Server can't load linked IFC</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/13826269#M84739</link>
      <description>&lt;P&gt;Appologies, disregard I have found this post for&amp;nbsp;RevitLinkType.UpdateFromIFC. Which solves my issue.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/reloading-ifc-link/td-p/8589091" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/reloading-ifc-link/td-p/8589091&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2025 02:26:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/external-resource-server-can-t-load-linked-ifc/m-p/13826269#M84739</guid>
      <dc:creator>Rockit_for_Revit</dc:creator>
      <dc:date>2025-09-26T02:26:57Z</dc:date>
    </item>
  </channel>
</rss>

