Search code examples
autodesk-forgeautodesk-designautomation

Problem The document can not be opened with Design Automation


I have an issue with extracting information of a big model include Revit link file. Before I tested with a small model, and it was working fine, but when I'm try with real project, it responds with "The document can not be opened".

This is how it look like in BIM 360 enter image description here

This is how link loaded look like:

enter image description here

The result text output:

{
  "status": "failedInstructions",
  "reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/chuong/e7f2350440e24f358f89de79a7c91907/report.txt?X-Amz-Expires=48600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAgaCXVzLWVhc3QtMSJHMEUCIQDHc0FtF7DejMMwnJcs1qQcDHpKTO7rvsQl6UDmZ07mZgIgaRXfR8Wq0imG83H8Ul0E8PXEr2qDHIzmb0SgFogODPUqgAMIcRAEGgwyMjA0NzMxNTIzMTAiDCqPtFe9aUjRLZk2hCrdApcSY6tP4PjKxjjdhonzSdr0gKNB7sJuYDSqqij04o7kNFWCMn5orAJDBzlLck6w2J5vXmAubS%2BINiDV6o5hb3xGsE0Tqg8FNPTVtULgNcnIBfA6SJ8dWgYeDQQixb0DNv9O%2BEwfYWi6K0nJoLtviMHDbrHHOrD0oU82Sjil4kWk1Y4Gna7AgLYVJUbTmJdqvcEKez74RuceTI%2F9i0KF4fjq4jl5bZ%2FDJi8DbeWce78MCz2%2Bh8w%2F2Nzxy%2FktFt7fdXeODQ%2BLJNTzXp9m06kS1m8Y%2F1GKIZ17DJoz5PPUDFZ7KG4hl8fcGh2ciu%2F3BZScHRnEHrolIV24f%2BWH%2FrPP31QA68VYcpta2JiopdiHOD2LYyMz5xDbXUsXZxK77oU%2FfIP2tKU5sFUmlirG%2BWb2mMWozu1or2oonZhqTEIdk2Z1UWd9WnVmr4rw%2F04mu0HZroqySFb8PjyBrTRXPIw1LC7qwY6ngGOG7e8VdYs51o3wZQWJgtHrizAeoRLTL1bkHyi3o%2FjuawRCj26t7XaQqqRwHcaqq799HrM0p07c2cWpPNYwU0yVmNUPAkSgzNfnXJYiCWJRKfsUOcwmw%2FLZiEcVVhmxUCRFlyMsquhtiB5SLNdMuYQzHQYnpMXZvlH%2F8nMcBWThZLeE7nv1DJ3%2FcY1TgxBeynlCV%2B%2BL3LZGXNkUhjOw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIATGVJZKM3A25O6ZXA%2F20231205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231205T094743Z&X-Amz-SignedHeaders=host&X-Amz-Signature=571a7fc19e90b786a0b37056c222b03191905d1326640ea9056810eb254c5e58",
  "stats": {
    "timeQueued": "2023-12-05T09:47:43.822186Z",
    "timeDownloadStarted": "2023-12-05T09:47:43.9878169Z",
    "timeInstructionsStarted": "2023-12-05T09:48:23.063894Z",
    "timeInstructionsEnded": "2023-12-05T09:48:39.6756967Z",
    "bytesDownloaded": 1643282025
  },
  "id": "e7f2350440e24f358f89de79a7c91907"
}

Report issue text file:

[12/05/2023 09:37:23] Job information:
{
  "CommandLine": [
    "$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[inputFile].path)\" /al \"$(appbundles[ExtractRoomApp].path)\""
  ],
  "Settings": {
    "script": {},
    "dasOpenNetwork": {
      "value": "true",
      "isEnvironmentVariable": true
    }
  },
  "Id": "5364405261db4fcab7390912311e1a12",
  "ActivityId": "chuong.ExtractRoomActivity+dev",
  "EngineId": "Autodesk.Revit_2022!111",
  "Apps": [
    "chuong.ExtractRoomApp!1"
  ],
  "BoundArguments": {
    "inputFile": {
      "localName": "$(inputFile)",
      "url": "https://developer.api.autodesk.com/Masked:5ExFkvl4kIUYxoDf5p1H6KVkfVc=",
      "headers": {
        "Authorization": "Masked:JZvFNdVezuuGzgPS++bx8BYmULM="
      }
    },
    "result": {
      "localName": "result.json",
      "url": "https://developer.api.autodesk.com/Masked:QncBiKhoDRMD7nneno7DNoKs2tQ=",
      "verb": "put"
    },
    "onComplete": {
      "ondemand": true,
      "optional": true,
      "url": "https://webhook.site/Masked:jj4Cb6+4JjGSYX7ds6SH7v3J46Q=",
      "verb": "post"
    }
  },
  "Quotas": {
    "limitProcessingTimeSec": 10800,
    "limitTotalUncompressedAppsSizeInMB": 5000
  }
}
[12/05/2023 09:37:23] Starting work item 5364405261db4fcab7390912311e1a12
[12/05/2023 09:37:24] Start download phase.
[12/05/2023 09:37:24] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/443c8464-a70c-4009-9140-0e41cd761f5b.rvt'
[12/05/2023 09:38:02] End downloading file. Source=https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/443c8464-a70c-4009-9140-0e41cd761f5b.rvt,LocalFile=T:\Aces\Jobs\5364405261db4fcab7390912311e1a12\28510851-3eb3-4b10-a8cc-e9f00ee3a068.zip,BytesDownloaded=1643282025,Duration=38845ms
[12/05/2023 09:38:02] End download phase successfully.
[12/05/2023 09:38:02] Start preparing script and command line parameters.
[12/05/2023 09:38:02] Command line: [ /i "T:\Aces\Jobs\5364405261db4fcab7390912311e1a12\28510851-3eb3-4b10-a8cc-e9f00ee3a068.zip" /al "T:\Aces\Applications\1f8c88d4b80171baeef657f5c0c83184.chuong.ExtractRoomApp[1].package"]
[12/05/2023 09:38:02] End preparing script and command line parameters.
[12/05/2023 09:38:02] Start script phase.
[12/05/2023 09:38:02] Start Revit Core Engine standard output dump.
[12/05/2023 09:38:03] ====== Revit is running: revitcoreconsole ======
[12/05/2023 09:38:03] Current Exe path: T:\Aces\AcesRoot\22.0\coreEngine\Exe\revitcoreconsole.exe
[12/05/2023 09:38:03] Echoing command line args:
[12/05/2023 09:38:03]   0:/i
[12/05/2023 09:38:03]   1:T:\Aces\Jobs\5364405261db4fcab7390912311e1a12\28510851-3eb3-4b10-a8cc-e9f00ee3a068.zip
[12/05/2023 09:38:03]   2:/al
[12/05/2023 09:38:03]   3:T:\Aces\Applications\1f8c88d4b80171baeef657f5c0c83184.chuong.ExtractRoomApp[1].package
[12/05/2023 09:38:03]   4:/isolate
[12/05/2023 09:38:03]   5:HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_5364405261db4fcab7390912311e1a12
[12/05/2023 09:38:03]   6:T:\Aces\Jobs\5364405261db4fcab7390912311e1a12\userdata
[12/05/2023 09:38:03] Selected Revit\RCE install Path: (from app.config)
[12/05/2023 09:38:03] Resolving location of Revit/RevitCoreEngine installation...
[12/05/2023 09:38:03] Loading RCE ....
[12/05/2023 09:38:08] Running user application....
[12/05/2023 09:38:08] Found an addIn for registration: Autodesk.Forge.Sample.RoomExtractor.addin
[12/05/2023 09:38:08] Language not specified, using English-United States(ENU) as default.
[12/05/2023 09:38:11] Get RCE: (VersionBuild) 22.1.50.7 (VersionNumber) 2022 (SubVersionNumber) 2022.1.5
[12/05/2023 09:38:11] Autodesk.Revit.Exceptions.InvalidOperationException: The document can not be opened.
[12/05/2023 09:38:11]    at Autodesk.Revit.ApplicationServices.Application.OpenDocumentFile(ModelPath modelPath, OpenOptions openOptions)
[12/05/2023 09:38:11]    at DesignAutomationFramework.DesignAutomationData..ctor(Application revitApp, String mainModelPath)
[12/05/2023 09:38:11]    at DesignAutomationFramework.DesignAutomationReadyEventArgs..ctor(Application revitApp, String mainModelPath)
[12/05/2023 09:38:11]    at DesignAutomationFramework.DesignAutomationBridge.SetDesignAutomationReady(Application revitApp, String mainModelPath)
[12/05/2023 09:38:11]    at RevitCoreEngineTest.RceConsoleApplication.Program.UserMain(CommandLineArgs cl)
[12/05/2023 09:38:17] RESULT: Failure - Result of running user app is failure
[12/05/2023 09:38:17] Finished running.  Process will return: TestError
[12/05/2023 09:38:17] ====== Revit finished running: revitcoreconsole ======
[12/05/2023 09:38:18] End Revit Core Engine standard output dump.
[12/05/2023 09:38:18] Error: Application revitcoreconsole.exe exits with code 4 which indicates an error.
[12/05/2023 09:38:18] End script phase.
[12/05/2023 09:38:18] Error: An unexpected error happened during phase CoreEngineExecution of job.
[12/05/2023 09:38:19] Job finished with result FailedExecution
[12/05/2023 09:38:19] Job Status:
{
  "status": "failedInstructions",
  "reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/chuong/5364405261db4fcab7390912311e1a12/report.txt?X-Amz-Expires=48600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAgaCXVzLWVhc3QtMSJHMEUCIQDHc0FtF7DejMMwnJcs1qQcDHpKTO7rvsQl6UDmZ07mZgIgaRXfR8Wq0imG83H8Ul0E8PXEr2qDHIzmb0SgFogODPUqgAMIcRAEGgwyMjA0NzMxNTIzMTAiDCqPtFe9aUjRLZk2hCrdApcSY6tP4PjKxjjdhonzSdr0gKNB7sJuYDSqqij04o7kNFWsCMn5orAJDBzlLck6w2J5vXmAubS%2BINiDV6o5hb3xGsE0Tqg8FNPTVtULgNcnIBfA6SJ8dWgYeDQQixb0DNv9O%2BEwfYWi6K0nJoLtviMHDbrHHOrD0oU82Sjil4kWk1Y4Gna7AgLYVJUbTmJdqvcEKez74RuceTI%2F9i0KF4fjq4jl5bZ%2FDJi8DbeWce78MCz2%2Bh8w%2F2Nzxy%2FktFt7fdXeODQ%2BLJNTzXp9m06kS1m8Y%2F1GKIZ17DJoz5PPUDFZ7KG4hl8fcGh2ciu%2F3BZScHRnEHrolIV24f%2BWH%2FrPP31QA68VYcpta2JiopdiHOD2LYyMz5xDbXUsXZxK77oU%2FfIP2tKU5sFUmlirG%2BWb2mMWozu1or2oonZhqTEIdk2Z1UWd9WnVmr4rw%2F04mu0HZroqySFb8PjyBrTRXPIw1LC7qwY6ngGOG7e8VdYs51o3wZQWJgtHrizAeoRLTL1bkHyi3o%2FjuawRCj26t7XaQqqRwHcaqq799HrM0p07c2cWpPNYwU0yVmNUPAkSgzNyfnXJYiCWJRKfsUOcwmw%2FLZiEcVVhmxUCRFlyMsquhtiB5SLNdMuYQzHQYnpMXZvlH%2F8nMcBWThZLeE7nv1DJ3%2FcY1TgxBeynlCV%2B%2BL3LZGXNkUhjOw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIATGVJZKM3A25O6ZXA%2F20231205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231205T093723Z&X-Amz-SignedHeaders=host&X-Amz-Signature=d44ea4b445a0e866378019f41fe96cf350ac36cba7cd88bbac5681f6b0e3516e",
  "stats": {
    "timeQueued": "2023-12-05T09:37:23.7656418Z",
    "timeDownloadStarted": "2023-12-05T09:37:23.889598Z",
    "timeInstructionsStarted": "2023-12-05T09:38:02.8475949Z",
    "timeInstructionsEnded": "2023-12-05T09:38:18.9165214Z",
    "bytesDownloaded": 1643282025
  },
  "id": "5364405261db4fcab7390912311e1a12"
}

Solution

  • Your workitem argument is incorrect.

    "inputFile": {
          "localName": "$(inputFile)",
          "url": "https://developer.api.autodesk.com/...",
          "headers": {
            "Authorization": "...."
          }
        },
        "result": {
          "localName": "result.json",
          "url": "https://developer.api.autodesk.com/...",
          "verb": "put"
        },
    

    For a ZIP package, it should be like the example below. Revit doesn't support opening a ZIP file directly. Your original Activity and Workitm config would be something like revit.exe "T:\Aces\Jobs\5364405261db4fcab7390912311e1a12\28510851-3eb3-4b10-a8cc-e9f00ee3a068.zip" in Windows using the command line.

    Please see https://aps.autodesk.com/blog/localname-pathinzip-zip

    "inputFile": {
          "localName": "$(inputFile)",
          "url": "https://developer.api.autodesk.com/...",
          "pathInZip": "root.rvt", //!<<<< the root filename 
          "headers": {
            "Authorization": "...."
          }
        },
        "result": {
          "localName": "result.json",
          "url": "https://developer.api.autodesk.com/...",
          "verb": "put"
        },
    

    And please refer to this blog post to check if your Revit model is a composite RCW design by checking if the version extension has "isCompositeDesign": true.

    https://aps.autodesk.com/blog/make-composite-revit-design-work-design-automation-api-revit