2

I would like to upload my Revit file to BIM 360, and work on it as a cloud model.

I am using Design Automation API in order to do that.

For some reason I get an error that says: "Could not obtain entitlement server"

This is my AppBundle code:

public class MyDaApp : IExternalDBApplication
{
    public ExternalDBApplicationResult OnStartup(ControlledApplication application)
    {
        DesignAutomationBridge.DesignAutomationReadyEvent += HandleDesignAutomationReadyEvent;
        return ExternalDBApplicationResult.Succeeded;
    }

    public ExternalDBApplicationResult OnShutdown(ControlledApplication application)
    {
        return ExternalDBApplicationResult.Succeeded;
    }

    public void HandleDesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
    {
        e.Succeeded = true;
        DoSomething(e.DesignAutomationData.RevitDoc);
    }

    public void DoSomething(Document doc)
    {
        doc.SaveAsCloudModel(@"urn:adsk.wipprod:fs.folder:co.alJahHjZSsG3m-mLlrcHNw", "Some File");
    }
}

After I create the WorkItem, its status becomes "failedInstructions". This is the exception log report it produces:

[06/10/2020 14:55:09] Initialize and  get RCE: (VersionBuild) 20.0.0.0 (VersionNumber) 2020 (SubVersionNumber) 2020.2
[06/10/2020 14:55:12] Autodesk.Revit.Exceptions.InvalidOperationException: Could not obtain entitlement server.
[06/10/2020 14:55:12]    at Autodesk.Revit.DB.Document.SaveAsCloudModel(String folderId, String modelName)
[06/10/2020 14:55:12]    at MyAppBundle.MyDaApp.HandleDesignAutomationReadyEvent(Object sender, DesignAutomationReadyEventArgs e)
[06/10/2020 14:55:12]    at DesignAutomationFramework.DesignAutomationBridge.RaiseDesignAutomationReadyEvent(DesignAutomationReadyEventArgs e)
[06/10/2020 14:55:12]    at RevitCoreEngineTest.RceConsoleApplication.Program.UserMain(CommandLineArgs cl)
[06/10/2020 14:55:18] 湥整楲杮映湩獩偨慬批捡⸮搠獥牴祯洠偟慬批捡卫慴整਍਍潣瑮湩極杮映湩獩偨慬批捡⸮搠獥牴祯挠污卬牴慥⡭ഩഊ攊楸整⁤楦楮桳汐祡慢正਍਍RESULT: Failure - Result of running user app is failure
[06/10/2020 14:55:18] Finished running.  Process will return: TestError
[06/10/2020 14:55:18] ====== Revit finished running: revitcoreconsole ======
[06/10/2020 14:55:19] End Revit Core Engine standard output dump.
[06/10/2020 14:55:19] Error: Application revitcoreconsole.exe exits with code 4 which indicates an error.
[06/10/2020 14:55:19] End script phase.
[06/10/2020 14:55:19] Error: An unexpected error happened during phase CoreEngineExecution of job.
[06/10/2020 14:55:19] Job finished with result FailedExecution

This is very strange, because when I run the Autodesk.Revit.DB.Document.SaveAsCloudModel() method, as an ExtrnalApplication through Revit UI, everything works perfectly. I get the exception only on Design Automation cloud.

Rahul Bhobe
  • 4,165
  • 4
  • 17
  • 32
Ofirster
  • 109
  • 8

1 Answers1

3

It is a current limitation of Design Automation that model saves can only be done into the current working directory of the cloud machine. This is because user apps are forbidden from accessing the network.

As such, doc.SaveAsCloudModel() is not currently supported on Design Automation. That said, we have noted your request for BIM 360 functionality in Design Automation!

Thanks, Michael

  • 1
    Thank you for your quick response. I thought the only limitations of Design Automation API is using Revit UI. The method SaveAsCloudModel() has nothing to do with Revit UI. So, is there a place where I can see all the methods that are not supported by Design Automation API. – Ofirster Jun 11 '20 at 07:12
  • 1
    Known restrictions are documented here: https://forge.autodesk.com/en/docs/design-automation/v3/developers_guide/restrictions/#design-automation-api-for-revit – Jeremy Tammik Oct 09 '20 at 10:07