I'm trying to execute an iLogic script in Automation API. The model is not tiny, so I'm uploading it as a single 24MB zip file. This is what my Activity looks like:
{
"commandLine": [
"$(engine.path)\\InventorCoreConsole.exe /i \"$(args[inputFile].path)\" /s \"$(args[iLogicVb].path)\""
],
"parameters": {
"iLogicVb": {
"verb": "get",
"localName": "input.iLogicVb"
},
"outputFile": {
"verb": "put",
"localName": "output.pdf"
},
"inputFile": {
"verb": "get",
"zip": true
}
},
"id": "<myidhere>",
"engine": "Autodesk.Inventor+2021",
"appbundles": [],
"description": "Running iLogic Rule"
}
And this is what my Workitem looks like:
{
"activityId": "<myidhere>",
"arguments": {
"outputFile": {
"verb": "put",
"localName": "output.pdf",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/...",
"headers": {
"Content-type": "application/octet-stream",
"Authorization": "..."
}
},
"inputFile": {
"verb": "get",
"pathInZip": "<assembly name>.iam",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/...",
"headers": {
"Content-type": "application/octet-stream",
"Authorization": "..."
}
},
"iLogicVb": {
"url": "https://developer.api.autodesk.com/oss/v2/buckets/...",
"verb": "get",
"localName": "input.iLogicVb",
"headers": {
"Content-type": "application/octet-stream",
"Authorization": "..."
}
}
}
}
And the iLogic code is pretty straight-forward:
Trace.WriteLine ("Starting rules")
ObjectWidth = 4 ft
ObjectHeight = 7 ft
Trace.WriteLine ("Saving PDF")
oDoc.SaveAs("output.pdf", true)
Trace.WriteLine ("Done")
According to the execution report, the zip file gets downloaded and unzipped successfully, but then the problem happens:
[07/29/2021 01:48:58] Starting work item 9b0e77a3f2d14d21b09d2eaee7652a81
[07/29/2021 01:48:58] Start download phase.
[07/29/2021 01:48:58] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/input.iLogicVb'
[07/29/2021 01:48:58] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/....zip'
[07/29/2021 01:48:58] '304' bytes have been written to T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\input.iLogicVb.
[07/29/2021 01:48:58] End downloading file from 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/input.iLogicVb'.
[07/29/2021 01:48:59] '24085650' bytes have been written to T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\zip_112.zip.
[07/29/2021 01:48:59] End downloading file from 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/....zip'.
[07/29/2021 01:49:00] T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\zip_112.zip has been unpacked to folder T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\unpack_folder_113.
[07/29/2021 01:49:00] End download phase successfully.
[07/29/2021 01:49:00] Start preparing script and command line parameters.
[07/29/2021 01:49:00] Error: The 'path2' is not defined.
[07/29/2021 01:49:00] Error: An unexpected error happened during phase CoreEngineExecution of job.
[07/29/2021 01:49:00] Job finished with result FailedExecution
And this The 'path2' is not defined is absolutely cryptic ungooglable error. What could cause it? Maybe there's a flag that could increase the output verbosity to see more?
"inputFile" in Activity needs "localName" property. Settings it to actual name of my zip file solved this error. Although this doesn't make the message less cryptic.
#thesame, thanks for reporting. I think this is one bug we will fix.
Related
I have implemented a viewer using Autodesk Platform Services (former name Forge) on .NET Core. In the bucket I upload 2D drawings in .dwg format.
I enabled the markup feature in the viewer, so now I can make any markup on top of the .dwg
What I have for the moment looks like this:
I need to save this dwg with the markups I did, and either have it as a 2nd dwg inside the bucket or to override the original one.
The steps I have taken until now:
In javascript behind I can get the markups only as .svg format using the .generateData() on the MarkupsCore extension:
const markupCore = await viewer.loadExtension('Autodesk.Viewing.MarkupsCore');
let svgMarkup = markupCore.generateData();
After getting the svg mark up, I convert it in .dxf file.
I think I need to use the Design Automation API to import this dxf file into the dwg,
but I don't know how to handle this.
I have checked the following link on importing dxf into dwg but so far I can't find something for my case.
AutoDesk Design Automation tutorials on autocad
In case someone knows maybe another way on handling this, please let me know.
I think I need to use the Design Automation API to import this dxf file into the dwg, but I don't know how to handle this.
Yes that is correct, you may insert the dxf into the main drawing, you should be knowing scaling and position, so that will placed correctly on top your drawing.
Activity
{
"id": "{{ _.activityId }}",
"commandLine": [
"$(engine.path)\\accoreconsole.exe /i \"$(args[main].path)\" /s $(settings[script].path)"
],
"parameters": {
"main": {
"verb": "get",
"description": "test",
"required": true,
"localName": "$(inputFile)"
},
"overlay": {
"verb": "get",
"description": "",
"required": true,
"localName": "markups.dxf"
},
"result": {
"verb": "put",
"description": "",
"required": true,
"localName": "result.dwg"
}
},
"engine": "Autodesk.AutoCAD+24_1",
"description": "import markups",
"settings": {
"script": "-insert\nmarkups.dxf\n4,1,0\n1\n1\n0\nsaveas\n2018\nresult.dwg\n"
}
}
WorkiItem
{
"activityId": "{{ _.nickName }}.{{ _.activityId }}+{{ _.alias }}",
"arguments": {
"main": {
"url": "urn:adsk.objects:os.object:madlybuckets/main.dwg",
"verb": "get",
"headers": {
"Authorization": "Bearer {{ _.oAuthToken }}"
}
},
"overlay": {
"url": "urn:adsk.objects:os.object:madlybuckets/markups.dxf",
"verb": "get",
"headers": {
"Authorization": "Bearer {{ _.oAuthToken }}"
}
},
"result": {
"verb": "put",
"url": "urn:adsk.objects:os.object:madlybuckets/result.dwg",
"headers": {
"Authorization": "Bearer {{ _.oAuthToken }}"
}
}
}
}
Here the main.dwg, markups.dxf is uploaded to APS Object Storage Service so that I can directly use object id of uploaded files instead of passing the object URL to the workitem.
I can successfully process Revit models with now linked documents on Forge Design Automation, but when I try to process models with linked documents I get this error:
Error: Failed to prepare app package(s). The process cannot access the file 'T:\Aces\Applications\Revit2ProtoExporter.zip' because it is being used by another process.
[11/06/2020 01:23:22] Error: Unable to download file https://developer.api.autodesk.com/oss/v2/signedresources/5b476183-5bfb-4e98-8276-505dec9cc972?region=US: System.InvalidOperationException: DasZip failed with exit code = 1
at CoreEngineRunner.DasZip.RunDasZipAsync()
at CoreEngineRunner.DasZip.ExtractToDirectoryAsync(String sourceArchiveFileName, String destinationDirectoryName, String encoding, CancellationToken ct, Boolean isFaultTolerantOn)
at CoreEngineRunner.DownloadItem.DownloadAsync(TraceSource logger).
[11/06/2020 01:23:22] Error: An unexpected error happened during phase Downloading of job.
[11/06/2020 01:23:22] Job finished with result FailedEnvironmentSetup
From what I can tell from the logs all the linked documents were successfully downloaded, so I am not sure what's going on. Below is the full log:
[11/06/2020 01:23:20] Job information:
"CommandLine":[
"\"$(engine.path)/revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[Revit2ProtoExporter].path)\""
]
"Settings":{
"dasreportfaileduploadoptional": {
"value": "true",
"isEnvironmentVariable": true
}
}
"Id":"8dff5a5fd1144e9e9302505e30987bdd"
"ActivityId":"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporterActivity+AppliedVR50"
"Engine.Id":"Autodesk.Revit!39"
"Apps": [
"App.Id":"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter!55"
]
"BoundArguments":{
"rvtFile": {
"zip": true,
"localName": "",
"pathInZip": "root.rvt",
"references": [
{
"url": "https://developer.api.autodesk.com/Masked:Sae2ipw7szdulRannCn5DzwBuhM="
},
{
"url": "https://developer.api.autodesk.com/Masked:NPqlMsVOXAFdIg5sx5eIR2Y26HI="
}
],
"url": "https://developer.api.autodesk.com/Masked:M+AnWc5OiowsRTaJvH8nPzTA9ao="
},
"params": {
"localName": "params.json",
"url": "data:application/json,{\"ViewId\": 7759865}"
},
"result": {
"localName": "result.avr",
"url": "https://developer.api.autodesk.com/Masked:TFOCpwjedup6t/kPU2xq3JvGyfo=",
"verb": "put"
},
"onProgress": {
"ondemand": true,
"url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Masked:UK/Z3b5X3xUWxXiH6C9r9i9UlRU=",
"headers": {
"Content-Type": "application/json",
"x-das-authorize": "awssigv4(us-east-1)",
"x-ads-token-data": "{\"access_token\":{\"client_id\":\"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI\"},\"scope\":\"code:all data:write data:read bucket:create bucket:delete\",\"expires_in\":3569,\"client_id\":\"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI\"}"
},
"verb": "put"
}
}
"Quotas":{
"limitProcessingTimeSec": 10800,
"limitTotalUncompressedAppsSizeInMB": 5000
}
[11/06/2020 01:23:20] Starting work item 8dff5a5fd1144e9e9302505e30987bdd
[11/06/2020 01:23:20] Start download phase.
[11/06/2020 01:23:20] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/signedresources/5b476183-5bfb-4e98-8276-505dec9cc972?region=US'
[11/06/2020 01:23:20] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/signedresources/c286f6d4-d6ac-45b8-84b7-7bd804d6cf35?region=US'
[11/06/2020 01:23:20] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/signedresources/66b668df-a639-4ba4-bb3b-2e2f35049365?region=US'
[11/06/2020 01:23:20] Embedded resource [{"ViewId": 7759865}] is saved as file: T:\Aces\Jobs\8dff5a5fd1144e9e9302505e30987bdd\params.json.
[11/06/2020 01:23:20] '4681728' bytes have been written to T:\Aces\Jobs\8dff5a5fd1144e9e9302505e30987bdd\9821ccb1a0bac5ffe69e46ca6d4ddde9.
[11/06/2020 01:23:20] End downloading file 'https://developer.api.autodesk.com/oss/v2/signedresources/c286f6d4-d6ac-45b8-84b7-7bd804d6cf35?region=US'.
[11/06/2020 01:23:20] '4685824' bytes have been written to T:\Aces\Jobs\8dff5a5fd1144e9e9302505e30987bdd\d6b0fa35b9c5a76b8868f754562fbc09.
[11/06/2020 01:23:20] End downloading file 'https://developer.api.autodesk.com/oss/v2/signedresources/66b668df-a639-4ba4-bb3b-2e2f35049365?region=US'.
[11/06/2020 01:23:21] '13568850' bytes have been written to T:\Aces\Jobs\8dff5a5fd1144e9e9302505e30987bdd\zip_21.zip.
[11/06/2020 01:23:21] End downloading file 'https://developer.api.autodesk.com/oss/v2/signedresources/5b476183-5bfb-4e98-8276-505dec9cc972?region=US'.
[11/06/2020 01:23:22] Error: Failed to prepare app package(s). The process cannot access the file 'T:\Aces\Applications\Revit2ProtoExporter.zip' because it is being used by another process.
[11/06/2020 01:23:22] Error: Unable to download file https://developer.api.autodesk.com/oss/v2/signedresources/5b476183-5bfb-4e98-8276-505dec9cc972?region=US: System.InvalidOperationException: DasZip failed with exit code = 1
at CoreEngineRunner.DasZip.RunDasZipAsync()
at CoreEngineRunner.DasZip.ExtractToDirectoryAsync(String sourceArchiveFileName, String destinationDirectoryName, String encoding, CancellationToken ct, Boolean isFaultTolerantOn)
at CoreEngineRunner.DownloadItem.DownloadAsync(TraceSource logger).
[11/06/2020 01:23:22] Error: An unexpected error happened during phase Downloading of job.
[11/06/2020 01:23:22] Job finished with result FailedEnvironmentSetup
[11/06/2020 01:23:22] Job Status:
{
"status": "failedDownload",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI/8dff5a5fd1144e9e9302505e30987bdd/report.txt?AWSAccessKeyId=ASIATGVJZKM3DKXULYFE&Expires=1604640200&x-amz-security-token=IQoJb3JpZ2luX2VjEKH%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJIMEYCIQD30WUuRtM0iuIWxkOah9t90%2B96TOt0DkqqAjHwzTuSKwIhAOm8LiqpZlwCDr6Ah4YWCzhSZ8xq0zzP4KRBHY2L0uMPKt4BCPr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAhoMMjIwNDczMTUyMzEwIgyxm%2BA7M7tzSCXAOAQqsgGayvqco1UE6lJY%2Fzm6Q%2BFcoeJvpYXKN%2Fbx8o6B2DqoExa14uAjmS9GkYaAr1GXX%2B1YUgHJqU1EhJK9A1IUe41I0VnrujiHpMF8h3zlQEJ3q%2Fhrxg7%2BPND7RaBmy9dLYrS4giEwcmw0LvLNhGQcX56DDbsrqn94fgseSnGXa8VzikJVRHJcW3QU2%2BTD95fED8Ti6FJlHr1cwnXrKXK%2FUpsa8sbXCl1AW8prMb3kwhQQBC5XMPS9kv0FOt8BYzfwE32Tqa95uBxIX4yKHW3r2VHUr7ERl6vbP%2BSbCL2%2BFjRWeBUnKhwvyhvu6qyRmncho5VMdtxZv%2FyRK3l3%2BYykUO%2BKOVWxuku1nD1gxdqrcq4Kydz4DDluNPxsgNr3Vm9ewRAdzYS9ANmHysWWVRFFB81rOmWUPgrpbTKiX8dCqvZKSjkoLXNKXGaYkYmnDHS0qymqF353mLw42D9%2FoRgLbqQBI0EJDrielO1L%2Fxh%2BsN7vRsch3XA2YywIIc1ZnQnfbsWaH7DvmgK43DC5RFRffsVtMek9%2FyGlzsgYhg%3D%3D&Signature=eXSYaQ493438TS381AOIZ6rFfBY%3D",
"stats": {
"timeQueued": "2020-11-06T01:23:20.2861629Z",
"timeDownloadStarted": "2020-11-06T01:23:20.6030353Z"
},
"id": "8dff5a5fd1144e9e9302505e30987bdd"
}
I am working on design automation Addin for Revit 2019.Actually I have gotten stucked at one point.It is working fine when I am debugging it locally, but when I am running it through server, it gives me following response which I have attached below.Please take a look and suggest me where I can be possibly wrong.
[06/09/2020 10:07:33] Job information:
"CommandLine":[
"$(engine.path)\\\\revitcoreconsole.exe /i $(args[inputFile].path) /al $(appbundles[RevisedContentAddin].path)"
]
"Settings":{
"dasreportfailedlimits": {
"value": "true",
"isEnvironmentVariable": true
}
}
"Id":"29aae4d6d5224f469560682dc901d976"
"ActivityId":"mytestapp21022020.RevisedContentAddin+test"
"Engine.Id":"Autodesk.Revit!34"
"Apps": [
"App.Id":"mytestapp21022020.RevisedContentAddin!1"
]
"BoundArguments":{
"inputFile": {
"localName": "$(inputFile)",
"url": "https://content.dropboxapi.com/Masked:6GSQvBCqbc0I7MDGYfRVsnTuAfg=",
"headers": {
"Authorization": "Masked:O6vUSYao0e4t3D7v89SRtj616Lk=",
"Dropbox-API-Arg": "{ \"path\":\"/adsk-forge/Test.rvt\" }"
}
},
"inputZip": {
"zip": true,
"localName": "$(inputZip)",
"url": "https://content.dropboxapi.com/Masked:6GSQvBCqbc0I7MDGYfRVsnTuAfg=",
"headers": {
"Authorization": "Masked:O6vUSYao0e4t3D7v89SRtj616Lk=",
"Dropbox-API-Arg": "{ \"path\":\"/adsk-forge/RFA_FOLDER.zip\" }"
}
},
"inputJson": {
"localName": "params.json",
"url": "https://content.dropboxapi.com/Masked:6GSQvBCqbc0I7MDGYfRVsnTuAfg=",
"headers": {
"Authorization": "Masked:O6vUSYao0e4t3D7v89SRtj616Lk=",
"Dropbox-API-Arg": "{ \"path\":\"/adsk-forge/params.json\" }"
}
},
"inputError": {
"localName": "Error.json",
"url": "https://content.dropboxapi.com/Masked:6GSQvBCqbc0I7MDGYfRVsnTuAfg=",
"headers": {
"Authorization": "Masked:O6vUSYao0e4t3D7v89SRtj616Lk=",
"Dropbox-API-Arg": "{ \"path\":\"/adsk-forge/Error.json\" }"
}
},
"outputFile": {
"localName": "outputFile.rvt",
"url": "https://content.dropboxapi.com/Masked:Ue5D6a5K1qggFCNLUJsXlCpkJ+E=",
"headers": {
"Authorization": "Masked:O6vUSYao0e4t3D7v89SRtj616Lk=",
"Content-Type": "application/octet-stream",
"Dropbox-API-Arg": "{\"path\":\"/adsk-forge/outputFile.rvt\", \"mode\":\"add\"}"
},
"verb": "post"
},
"outputJson": {
"localName": "params.json",
"url": "https://content.dropboxapi.com/Masked:Ue5D6a5K1qggFCNLUJsXlCpkJ+E=",
"headers": {
"Authorization": "Masked:O6vUSYao0e4t3D7v89SRtj616Lk=",
"Content-Type": "application/octet-stream",
"Dropbox-API-Arg": "{\"path\":\"/adsk-forge/params.json\", \"mode\":\"add\"}"
},
"verb": "post"
},
"outputError": {
"localName": "Error.json",
"url": "https://content.dropboxapi.com/Masked:Ue5D6a5K1qggFCNLUJsXlCpkJ+E=",
"headers": {
"Authorization": "Masked:O6vUSYao0e4t3D7v89SRtj616Lk=",
"Content-Type": "application/octet-stream",
"Dropbox-API-Arg": "{\"path\":\"/adsk-forge/Error.json\", \"mode\":\"add\"}"
},
"verb": "post"
},
"onProgress": {
"ondemand": true,
"url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Masked:UK/Z3b5X3xUWxXiH6C9r9i9UlRU=",
"headers": {
"Content-Type": "application/json",
"x-das-authorize": "awssigv4(us-east-1)",
"x-ads-token-data": "{\"access_token\":{\"client_id\":\"IxoKacMvZAUVe4Gk9vVhDWGYJI49fAGj\"},\"scope\":\"data:read data:write data:create data:search bucket:create bucket:read bucket:update bucket:delete account:read account:write code:all\",\"expires_in\":2247,\"client_id\":\"IxoKacMvZAUVe4Gk9vVhDWGYJI49fAGj\"}"
},
"verb": "put"
}
}
"Quotas":{
"limitDownloads": 200,
"limitUploads": 200,
"limitDownloadSizeMB": 2000,
"limitUploadSizeMB": 2000,
"limitProcessingTimeSec": 10800,
"limitTotalUncompressedAppsSizeInMB": 5000
}
[06/09/2020 10:07:33] Starting work item 29aae4d6d5224f469560682dc901d976
[06/09/2020 10:07:33] Start download phase.
[06/09/2020 10:07:33] Start preparing AppPackage RevisedContentAddin.
[06/09/2020 10:07:33] Start downloading file https://content.dropboxapi.com/2/files/download.
[06/09/2020 10:07:33] Reuse previously downloaded app '0b56d13f0db62fef7a4dceaaba9f2c32.mytestapp21022020.RevisedContentAddin[1]' from local cache.
[06/09/2020 10:07:33] Start downloading file https://content.dropboxapi.com/2/files/download.
[06/09/2020 10:07:33] Start downloading file https://content.dropboxapi.com/2/files/download.
[06/09/2020 10:07:33] Start downloading file https://content.dropboxapi.com/2/files/download.
[06/09/2020 10:07:33] Error: Failed - 409 (path/not_found/...)
Request: GET https://content.dropboxapi.com/2/files/download
Request Headers:
Authorization: Bearer Pa0NeErce7AAAAAAAAAA2AOczAx9QihaGl48RtCHQdGlxOEOc8X8y53ntPqqcRzO
Dropbox-API-Arg: { "path":"/adsk-forge/params.json" }
Response Headers:
Server: nginx
Date: Tue, 09 Jun 2020 10:07:33 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Dropbox-API-Arg
X-Content-Type-Options: nosniff
Content-Security-Policy: sandbox
X-WebKit-CSP: sandbox
X-Content-Security-Policy: sandbox
X-Dropbox-Request-Id: 110f316a5fec33eccb1bbbc4dacb4753
X-Robots-Tag: noindex, nofollow, noimageindex
Response Content Headers:
Content-Type: application/json
Content-Disposition: attachment; filename=unspecified
Response Body:
{"error_summary": "path/not_found/...", "error": {".tag": "path", "path": {".tag": "not_found"}}}
[06/09/2020 10:07:33] Error: Unable to download file https://content.dropboxapi.com/2/files/download: System.Web.Http.HttpResponseException: Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details.
at CoreEngineRunner.DownloadItem.HttpDownloadStreamAsync(String url, Dictionary`2 headers, IReport log, Action`1 onContentFileName, CancellationToken ct, Int64 clientTimeoutSec)
at CoreEngineRunner.DownloadItem.DownloadAsync(TraceSource logger).
[06/09/2020 10:07:33] Error: Failed - 409 (path/not_found/...)
Request: GET https://content.dropboxapi.com/2/files/download
Request Headers:
Authorization: Bearer Pa0NeErce7AAAAAAAAAA2AOczAx9QihaGl48RtCHQdGlxOEOc8X8y53ntPqqcRzO
Dropbox-API-Arg: { "path":"/adsk-forge/Error.json" }
Response Headers:
Server: nginx
Date: Tue, 09 Jun 2020 10:07:33 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Dropbox-API-Arg
X-Content-Type-Options: nosniff
Content-Security-Policy: sandbox
X-WebKit-CSP: sandbox
X-Content-Security-Policy: sandbox
X-Dropbox-Request-Id: 70effff9759f8d429c701fef7ffe3e3c
X-Robots-Tag: noindex, nofollow, noimageindex
Response Content Headers:
Content-Type: application/json
Content-Disposition: attachment; filename=unspecified
Response Body:
{"error_summary": "path/not_found/...", "error": {".tag": "path", "path": {".tag": "not_found"}}}
[06/09/2020 10:07:33] Error: Unable to download file https://content.dropboxapi.com/2/files/download: System.Web.Http.HttpResponseException: Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details.
at CoreEngineRunner.DownloadItem.HttpDownloadStreamAsync(String url, Dictionary`2 headers, IReport log, Action`1 onContentFileName, CancellationToken ct, Int64 clientTimeoutSec)
at CoreEngineRunner.DownloadItem.DownloadAsync(TraceSource logger).
[06/09/2020 10:07:34] '352256' bytes have been written to T:\Aces\Jobs\29aae4d6d5224f469560682dc901d976\54dc126271a24adf92016eba8de1275b.rvt.
[06/09/2020 10:07:34] End downloading file https://content.dropboxapi.com/2/files/download.
[06/09/2020 10:07:38] '182077067' bytes have been written to T:\Aces\Jobs\29aae4d6d5224f469560682dc901d976\zip_1.zip.
[06/09/2020 10:07:38] End downloading file https://content.dropboxapi.com/2/files/download.
[06/09/2020 10:07:39] T:\Aces\Jobs\29aae4d6d5224f469560682dc901d976\zip_1.zip has been unpacked to folder T:\Aces\Jobs\29aae4d6d5224f469560682dc901d976\$(inputZip).
[06/09/2020 10:07:39] Error: Download failed, reason: path/not_found/... (409).
[06/09/2020 10:07:39] Error: An unexpected error happened during phase Downloading of job.
[06/09/2020 10:07:39] Job finished with result FailedDownload
[06/09/2020 10:07:39] Job Status:
{
"status": "failedDownload",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/mytestapp21022020/29aae4d6d5224f469560682dc901d976/report.txt?AWSAccessKeyId=ASIATGVJZKM3AB4IGHG3&Expires=1591711653&x-amz-security-token=IQoJb3JpZ2luX2VjEJr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJGMEQCIALGa5UPgdrN%2BedJ9kQDj0WmtzopvtJ8pP3Vj1JzVGTaAiAuI24FSrbbm2b6aIoiv2M7NInggIh03w8HbrrxRrAEjyrVAQgSEAEaDDIyMDQ3MzE1MjMxMCIMTeYqBAUSs6Yr2CK3KrIBqyKbz5RQXfefggrtBbtzaWOHzWiYYKeS94SrYAS21YvkVaiRWjiO5oNQ5Ge%2Bj5kUD6Ebo5MWzmeGOdTvs78Pmv5wA%2Bd799bkLiBlqtHVF3xRfW5rU%2F1hFVAmMoXy%2B%2BaVm%2BMeVBskVzEgOb%2BiTl5OIuEpRxbdkh0UseiSQwiOgYiPAkGCnN%2FyCdGT%2BBIZpeI9zeJMSg57qAItA33UK%2BQDN%2FXbnQCoI8VKRie0jeTLKr3ebzCUov32BTrhAQ4G2riZ1YJOZGskxw47jFFaE4P33DoLL0Poq0r9zAZSeThOMhgor0NourIHiP%2BaUfhMYjXgnLoxxPAyb%2BWTC5TA10WCcNkROwu%2FpA6wmh2DLdMdyokzSYoj7Kt%2FSdzj%2FuuY5dqGZv9y5z4uUjKU903Zzsjg6yf4IK29hiTh8Z0gBqB9FIULzqI9LxQznkDmlphPSk%2FYkePdvT887Cn23jTj%2FYEbzBOpmDE0LEIWkDl3SnfCCAEfqvE%2B2vQPUiPIaBZH8q9xJqb94pEv5evcf6umkc3pkRiYicOPWrHCDxDHxw%3D%3D&Signature=dm6HpnFiICbCH%2BijWtZlpuA2AIE%3D",
"stats": {
"timeQueued": "2020-06-09T10:07:33.1476295Z",
"timeDownloadStarted": "2020-06-09T10:07:33.3824128Z"
},
"id": "29aae4d6d5224f469560682dc901d976"
}
I wasn't aware of a "path/not_found" error on Design Automation (found at the bottom of your report) so I checked out the Dropbox API to see if it was a download problem from Dropbox.
Looks like there are many cases of "not_found" errors in the DropBox API docs, so I believe the issue lies with the Dropbox download definition.
I encourage you to re-check the definition of your input arguments to make sure there are no issues there. Let us know how it goes!
Before the October eve, the information provided in the Revit console log allowed us to recover the return files.
Now this is not possible anymore!
Before:
"outputFile": {
"optional": true,
"localName": "OutputRvtFile.rvt",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/caqg5kf4prwtqmmvrw_designautomation/objects/20190718115854_output_xxxxxxx.rvt",
"headers": {
"Authorization": "Bearer eyJh…."
},
"verb": "put"
},
Now :
"outputFile": {
"optional": true,
"localName": "OutputRvtFile.rvt",
"url": "https://developer.api.autodesk.com/Masked:tAUm....1RT08=",
"headers": {
"Authorization": "Masked:MT….E+zJONm3VU="
},
"verb": "put"
},
Before we had the file link as well as the varible Bearer but now there is more and the documentation has not been updated, or not found the latest news.
When I donwload the file, I have this element :
{ "developerMessage":"The requested resource does not exist.","userMessage":"","errorCode":"ERR-002","more info":"http://developer.api.autodesk.com/documentation/v1/errors/err-002"}
Could someone put me on the right road?
What is my problem?
Olivier,
The RVT output file's URL and authorization headers are the same URL and authorization headers you passed into Design Automation for Revit as part of your WorkItem payload.
Autodesk values your privacy and the security of your data in Design Automation. Your URLs and bearer tokens are being masked in Design Automation logs, including report.log, so that your sensitive data is not visible to Autodesk after your job is run.
Best,
Michael
I have an application that submits work items to Design Automation for Revit (Design Automation v3 beta). Most of the work items submitted work fine, but some versions of the models appear to fail to parse the "rvtFile" argument. This then leads to the cloud Revit process failing to run because the file name argument is wrong.
Body of Activity POST:
{
"id": "ExtractModelCategoriesActivity",
"commandLine": ["$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"],
"parameters": {
"rvtFile": {
"zip": false,
"ondemand": false,
"verb": "get",
"description": "Input Revit model",
"required": true,
"localName": "$(rvtFile)"
},
"result": {
"zip": false,
"ondemand": false,
"verb": "put",
"description": "Model object categories by view",
"required": false,
"localName": "ModelCategories.json"
}
},
"engine": "Autodesk.Revit+2019",
"appbundles": ["alias_was_here.ExtractModelCategories+prod"],
"description": "Extract Model Categories to JSON Activity."
}
Body of Work Item POST:
{
"activityId": "alias_was_here.ExtractModelCategoriesActivity+prod",
"arguments": {
"rvtFile": {
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/83b5eb1e-c9b7-4938-ad4e-8efc4789d0e2.rvt?scopes=b360project.22109894-5897-4aa9-96ab-2e3310bc4ae9,global,O2tenant.5952590",
"Headers": {
"Authorization": "Bearer token_was_here"
}
},
"result": {
"verb": "put",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/9dde6073-d490-4fd0-991e-4ff92af1957e.json",
"Headers": {
"Authorization": "Bearer token_was_here"
}
},
"onComplete": {
"verb": "post",
"url": "callback_url_was_here"
}
}
}
From the report.txt file for a successful submission:
[04/16/2019 12:03:50] Job information:
"CommandLine":[
"$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"
]
"Settings":{
"dasreportfailedlimits": {
"value": "true",
"isEnvironmentVariable": true
}
}
"Id":"e23918d475a74145aade32ba8968e5c3"
"ActivityId":"alias_was_here.ExtractModelCategoriesActivity+prod"
"Engine.Id":"Autodesk.Revit!21"
"Apps": [
"App.Id":"alias_was_here.ExtractModelCategories!1"
]
"BoundArguments":{
"rvtFile": {
"localName": "$(rvtFile)",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/839a11d8-51e9-42de-8936-28687feda65f.rvt?scopes=b360project.1949ed9d-e7fd-42b9-98f4-544fff3df42f,global,O2tenant.2971682",
"headers": {
"Authorization": "Bearer token_was_here"
}
},
"result": {
"localName": "ModelCategories.json",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/dd19b8f6-ac51-45b9-8f42-51c7c6a9d257.json",
"headers": {
"Authorization": "Bearer token_was_here"
},
"verb": "put"
},
"onComplete": {
"ondemand": true,
"optional": true,
"url": "callback_was_here",
"verb": "post"
},
"onProgress": {
"ondemand": true,
"url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Prod/v3/workitems/progress",
"headers": {
"Content-Type": "application/json",
"x-das-authorize": "awssigv4(us-east-1)",
"x-ads-token-data": "{\"access_token\":{\"client_id\":\"alias_was_here\"},\"scope\":\"bucket:create bucket:read data:read data:create data:write code:all\",\"expires_in\":3595,\"client_id\":\"alias_was_here\"}",
"x-ads-developer-email": "email_was_here"
},
"verb": "put"
}
}
- snip -
[04/16/2019 12:03:57] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_e23918d475a74145aade32ba8968e5c3 "T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\userdata" /exe "T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe" /i T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\839a11d8-51e9-42de-8936-28687feda65f.rvt /al T:\Aces\Applications\779cf68955e15ce6704c72a62c734afe.alias_was_here.ExtractModelCategories[1].package.
- snip -
[04/16/2019 12:03:57] Echoing command line args:
[04/16/2019 12:03:57] 0:/i
[04/16/2019 12:03:57] 1:T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\839a11d8-51e9-42de-8936-28687feda65f.rvt
- snip -
[04/16/2019 12:03:57] Running user application....
- snip -
[04/16/2019 12:04:22] Job finished with result Succeeded
[04/16/2019 12:04:22] Job Status:
{
"status": "success",
...
From the report.txt file for a failed submission:
[04/16/2019 12:04:44] Job information:
"CommandLine":[
"$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"
]
"Settings":{
"dasreportfailedlimits": {
"value": "true",
"isEnvironmentVariable": true
}
}
"Id":"4db3208a1c4e429c846c4da385f2219d"
"ActivityId":"alias_was_here.ExtractModelCategoriesActivity+prod"
"Engine.Id":"Autodesk.Revit!21"
"Apps": [
"App.Id":"alias_was_here.ExtractModelCategories!1"
]
"BoundArguments":{
"rvtFile": {
"localName": "$(rvtFile)",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/e597df42-07c7-41e1-aa0c-fa1abd179a4c.rvt?scopes=b360project.1949ed9d-e7fd-42b9-98f4-544fff3df42f,global,O2tenant.2971682",
"headers": {
"Authorization": "Bearer token was here"
}
},
"result": {
"localName": "ModelCategories.json",
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/6b59f894-bbf0-421a-bf0b-e80d7584ee33.json",
"headers": {
"Authorization": "Bearer token_was_here"
},
"verb": "put"
},
"onComplete": {
"ondemand": true,
"optional": true,
"url": "callback_was_here",
"verb": "post"
},
"onProgress": {
"ondemand": true,
"url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Prod/v3/workitems/progress",
"headers": {
"Content-Type": "application/json",
"x-das-authorize": "awssigv4(us-east-1)",
"x-ads-token-data": "{\"access_token\":{\"client_id\":\"alias_was_here\"},\"scope\":\"bucket:create bucket:read data:read data:create data:write code:all\",\"expires_in\":3596,\"client_id\":\"alias_was_here\"}",
"x-ads-developer-email": "email_was here"
},
"verb": "put"
}
}
- snip -
[04/16/2019 12:04:56] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_4db3208a1c4e429c846c4da385f2219d "T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\userdata" /exe "T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe" /i T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile) /al T:\Aces\Applications\779cf68955e15ce6704c72a62c734afe.alias_was_here.ExtractModelCategories[1].package.
- snip -
[04/16/2019 12:04:56] Echoing command line args:
[04/16/2019 12:04:56] 0:/i
[04/16/2019 12:04:56] 1:T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile)
[04/16/2019 12:04:56] Running user application....
[04/16/2019 12:05:02] Exception: Revit input file not found: T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile)
- snip -
[04/16/2019 12:05:03] Job finished with result FailedExecution
[04/16/2019 12:05:03] Job Status:
{
"status": "failedInstructions",
...
As best I can tell, the format and structure of the body of both of the submissions is the same (these are version 10 and version 11 of the same model). However, for the failing work item, the Revit file name is not parsing and is still the string $(rvtFile) rather than the actual file name when DA processes the work item.
Any insight into the problem? Does the body of the submission have errors in it? How do I correct?
I am answering my own question based on what I have learned with the assistance of Zhong Wu with Autodesk:
This is currently an issue with the Design Automation for Revit API Beta. If the Revit model includes links to other models then the file downloaded to Design Automation is zipped and includes the main model and the linked file(s). Design Automation then fails because it expects a Revit file. This happens automatically on the API's side.
A work-around is to download the Revit file to another location utilizing the Data Management API. If the file provided by the Data Management API is a compressed file and not a Revit model, un-zip it. Then, place the uncompressed Revit file in a location accessible to Design Automation and post the work item referencing the location of the uncompressed file.
It is my understanding that a change request has been issued internally at Autodesk to improve the handling of compressed files. I have no timeline for this.
If I learn more, I will update this answer.
** UPDATE**
This was fixed by the Autodesk Forge team, and now runs for Revit files with links. Thank you!
Instead of using "localName": "$(rvtFile), could you use a static file name like "localName": "input.rvt"?