I have a Revit addin that I am trying to run in APS Design Automation (DAS). However, I cannot get it to run without getting "status": "failedInstructions". None of the Console.WriteLine text is in the report.txt and there is no debug.txt in the bucket after the work item completes. I am starting to think that the addin might not actually be running. I have tried multiple versions of .cs and bundles and have reduced the code to do nothing more than Console.WriteLine.
This is my first DAS addin, so I don't have a working example to compare against. I am looking for any input related to how to resolve failedInstructions. Thanks!
<<<<<< Here is the .cs file >>>>>>>
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.DB;
using DesignAutomationFramework;
namespace hormann_quickdraw_addin
{
public class AddinApp : IExternalDBApplication
{
public ExternalDBApplicationResult OnStartup(ControlledApplication application)
{
Console.WriteLine("Quickdraw APS Plugin OnStartup");
// Register the APS Design Automation event handler
DesignAutomationBridge.DesignAutomationReadyEvent += HandleDesignAutomationReadyEvent!;
return ExternalDBApplicationResult.Succeeded;
}
public ExternalDBApplicationResult OnShutdown(ControlledApplication application)
{
Console.WriteLine("Quickdraw APS Plugin OnShutdown");
return ExternalDBApplicationResult.Succeeded;
}
public void HandleDesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
{
File.AppendAllText("debug.txt", "Hello World! Quickdraw APS Plugin HandleDesignAutomationReadyEvent\n");
try
{
File.AppendAllText("debug.txt", "Hello World! Quickdraw APS Plugin HandleDesignAutomationReadyEvent\n");
Console.WriteLine("Hello World! In the try/catch");
e.Succeeded = true;
}
catch (Exception ex)
{
File.AppendAllText("debug.txt", "Quickdraw EXCEPTION: " + ex.Message);
Console.WriteLine("Quickdraw EXCEPTION: {0}", ex.Message);
e.Succeeded = false;
}
}
}
}
<<<<<< Here is the Report.txt >>>>>
[05/27/2025 14:35:09] Job information:
"CommandLine": [
"$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[rvtFile].path)\" /al \"$(appbundles[QuickdrawAddinTEST].path)\""
],
"Settings": {
"dasOpenNetwork": {
"value": "true",
"isEnvironmentVariable": true
}
},
"Id": "0bac346a0ca34a3db414b9153e78e2ac",
"ActivityId": "quickdrawTEST.UpdateAndExport+test",
"EngineId": "Autodesk.Revit_2025!120",
"Apps": [
"quickdrawTEST.QuickdrawAddinTEST!15"
],
"BoundArguments": {
"rvtFile": {
"localName": "input.rvt",
"url": "urn:adsk.objects:os.object:qdraw_modelbucket/SG5000CU42.rvt",
"headers": {
"Authorization": "Masked:17NooMmNBBNnSSD8z3ivUUd/djI="
},
"verb": "get"
},
"paramFile": {
"localName": "params.json",
"url": "urn:adsk.objects:os.object:qdraw_bucket/inputparams.json",
"headers": {
"Authorization": "Masked:17NooMmNBBNnSSD8z3ivUUd/djI="
},
"verb": "get"
},
"result": {
"localName": "result.pdf",
"url": "urn:adsk.objects:os.object:qdraw_bucket/test1pdfoutput.pdf",
"headers": {
"Content-Type": "application/pdf",
"Authorization": "Masked:17NooMmNBBNnSSD8z3ivUUd/djI="
},
"verb": "put"
},
"debugLog": {
"localName": "debug.txt",
"url": "urn:adsk.objects:os.object:qdraw_bucket/debug.txt",
"headers": {
"Content-Type": "text/plain",
"Authorization": "Masked:17NooMmNBBNnSSD8z3ivUUd/djI="
},
"verb": "put"
}
},
"Quotas": {
"limitProcessingTimeSec": 10800,
"limitTotalUncompressedAppsSizeInMB": 5000
}
}
[05/27/2025 14:35:09] Starting work item 0bac346a0ca34a3db414b9153e78e2ac
[05/27/2025 14:35:09] Start download phase.
[05/27/2025 14:35:09] Start downloading input: verb - 'Get', url - 'urn:adsk.objects:os.object:qdraw_modelbucket/SG5000CU42.rvt'
[05/27/2025 14:35:09] Start downloading input: verb - 'Get', url - 'urn:adsk.objects:os.object:qdraw_bucket/inputparams.json'
[05/27/2025 14:35:10] End downloading file. Source=urn:adsk.objects:os.object:qdraw_bucket/inputparams.json,LocalFile=T:\Aces\Jobs\0bac346a0ca34a3db414b9153e78e2ac\params.json,BytesDownloaded=121,Duration=195ms
[05/27/2025 14:35:10] End downloading file. Source=urn:adsk.objects:os.object:qdraw_modelbucket/SG5000CU42.rvt,LocalFile=T:\Aces\Jobs\0bac346a0ca34a3db414b9153e78e2ac\input.rvt,BytesDownloaded=59420672,Duration=828ms
[05/27/2025 14:35:10] End download phase successfully.
[05/27/2025 14:35:10] Start preparing script and command line parameters.
[05/27/2025 14:35:10] Command line: [ /i "T:\Aces\Jobs\0bac346a0ca34a3db414b9153e78e2ac\input.rvt" /al "T:\Aces\Applications\dae184997428b6148f5ab57990a6da2e.quickdrawTEST.QuickdrawAddinTEST[15].package"]
[05/27/2025 14:35:10] End preparing script and command line parameters.
[05/27/2025 14:35:10] Start script phase.
[05/27/2025 14:35:10] Start Revit Core Engine standard output dump.
[05/27/2025 14:35:11] ====== Revit is running: revitcoreconsole ======
[05/27/2025 14:35:11] Current Exe path: T:\Aces\AcesRoot\25.0\coreEngine\Exe\revitcoreconsole.dll
[05/27/2025 14:35:11] Echoing command line args:
[05/27/2025 14:35:11] 0:/i
[05/27/2025 14:35:11] 1:T:\Aces\Jobs\0bac346a0ca34a3db414b9153e78e2ac\input.rvt
[05/27/2025 14:35:11] 2:/al
[05/27/2025 14:35:11] 3:T:\Aces\Applications\dae184997428b6148f5ab57990a6da2e.quickdrawTEST.QuickdrawAddinTEST[15].package
[05/27/2025 14:35:11] 4:/isolate
[05/27/2025 14:35:11] 5:HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_0bac346a0ca34a3db414b9153e78e2ac
[05/27/2025 14:35:11] 6:T:\Aces\Jobs\0bac346a0ca34a3db414b9153e78e2ac\userdata
[05/27/2025 14:35:11] Selected Revit\RCE install Path: (from app.config)
[05/27/2025 14:35:11] Resolving location of Revit/RevitCoreEngine installation...
[05/27/2025 14:35:11] Loading RCE ....
[05/27/2025 14:35:20] Running user application....
[05/27/2025 14:35:20] Found an addIn for registration: QuickdrawAddinTEST.addin
[05/27/2025 14:35:20] Language not specified, using English-United States(ENU) as default.
[05/27/2025 14:35:33] Get RCE: (VersionBuild) 25.3.0.46 (VersionNumber) 2025 (SubVersionNumber) 2025.3
[05/27/2025 14:38:19] RESULT: Failure - Result of running user app is failure
[05/27/2025 14:38:19] Finished running. Process will return: TestError
[05/27/2025 14:38:19] ====== Revit finished running: revitcoreconsole ======
[05/27/2025 14:38:20] End Revit Core Engine standard output dump.
[05/27/2025 14:38:20] Error: Application revitcoreconsole.exe exits with code 4 which indicates an error.
[05/27/2025 14:38:20] End script phase.
[05/27/2025 14:38:21] Error: An unexpected error happened during phase CoreEngineExecution of job.
[05/27/2025 14:38:21] Job finished with result FailedExecution
[05/27/2025 14:38:21] Job Status:
{
"status": "failedInstructions",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/quickdrawTEST/0bac346a0ca34a3db414b9153e78e2ac/report?X-Amz-Expires=48600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEJf%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIGLy7CduP0j40Zta%2B9scHEhEbIEWfmWKQjjx986rLI6kAiEA1IcFwGIaCUXvh5HJ9EIJ6Pw20x01NVAOAM8XFQa0yJwqgAMIYBAEGgwyMjA0NzMxNTIzMTAiDI%2FeYX6naVkL5r7E7yrdAqxeHjSnqrcZMCrhM%2FRyMob1Qm%2BcHeG74SGSyOj2XjT6AiMpTO5eLKQAEvjYRr5mUhm2IPJivHVvKRWNxywUnLYkESWlPmSjWi1U8voI2ykXUBXRJJCN%2BcZUED87IKQdShSUyQMsci2YZn0xeQ%2FksxPxBvSG9kDb5IB31CFleUwRiBAomSMXmOlqnMKLPltQDQTfyrGkAPyllnbL46VXLkm1vwpi%2B0swDw3Lw91mvfzNdLAgSzg51%2BfEm4rmYiFEnaNKWxl34L4pCXBXXIyq0pFTOLi5N8VJivA3zzSI7CMnqE0lroZ01zls1Z1liR6kf67dkcMXkK%2BBzwNp7PnSZxS0DTkg5MjDy9dVsYjrCqAb5%2FEbo33igZ9Kns3MN%2BoSqIqbUHKe8SRX8MuMWyC6VSP0l%2FTYoGKthdiL0lYBWY1SGfRbkfL86ctZNgGzrVwmMMGljuM6V4pcnLxl4jgwopjXwQY6ngFTgbrg0issvqRjyduiT%2FRRUp3HJTJjZffyiVNk2r8%2BN31yzagqjUWP7IiOUijmO90C1yTFwtqYFpgiizChvob%2FPUe7nGKXU43R3jt9veXBg2GxW%2BtnoWZPhgPahYnw%2FSlGjhw5O4pMp561vtZRaniQy9DeWqJsM8n3MB0xMCicXNgQQyuy11sqwb5m2zGJ7PRTretBuviB9YXZvSEbjw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIATGVJZKM3C3PO3633%2F20250527%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250527T143418Z&X-Amz-SignedHeaders=host&X-Amz-Signature=22a6a0da83ca166dfb7b6c60db12130e8906d1eb58fb531256f0b7cb2104f057",
"activityId": "quickdrawTEST.UpdateAndExport+test",
"stats": {
"timeQueued": "2025-05-27T14:34:18.302745Z",
"timeDownloadStarted": "2025-05-27T14:35:09.619601Z",
"timeInstructionsStarted": "2025-05-27T14:35:10.7678753Z",
"timeInstructionsEnded": "2025-05-27T14:38:21.0565322Z",
"bytesDownloaded": 59420793
},
"id": "0bac346a0ca34a3db414b9153e78e2ac"
}
Unfortunately, I cannot reproduce this issue with your addin code (i.e. CS file). My process result is success. The only error I can see is "Error: Non-optional output [result.pdf] is missing", which does not exist in your code.
[06/09/2025 07:24:12] Job information:
{
"CommandLine": [
"$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[rvtFile].path)\" /al \"$(appbundles[TestSandboxApp].path)\""
],
"Settings": {
"dasOpenNetwork": {
"value": "true",
"isEnvironmentVariable": true
}
},
"Id": "7182a8202f4649da9fa9867db5a889d8",
"ActivityId": "Kangs.TestSandboxAppActivity+dev",
"EngineId": "Autodesk.Revit_2025!120",
"Apps": [
"Kangs.TestSandboxApp!1"
],
"BoundArguments": {
"rvtFile": {
"localName": "input.rvt",
"url": "urn:adsk.objects:os.object:.../racbasicsampleproject.rvt",
"headers": {
"Authorization": "Masked:..."
},
"verb": "get"
},
"paramFile": {
"localName": "params.json",
"url": "data:application/json,{\"exportSettingName\":\"My IFC Export Setup\", \"viewId\": \"44745acb-ebea-4fb9-a091-88d28bd746c7-000ea86d\"}",
"verb": "get"
},
"result": {
"localName": "result.pdf",
"url": "urn:adsk.objects:os.object:.../result.pdf",
"headers": {
"Content-Type": "application/octet-stream",
"Authorization": "Masked:..."
},
"verb": "put"
},
"debugLog": {
"localName": "debug.txt",
"url": "urn:adsk.objects:os.object:.../debug.txt",
"headers": {
"Content-Type": "application/octet-stream",
"Authorization": "Masked:..."
},
"verb": "put"
}
},
"Quotas": {
"limitProcessingTimeSec": 10800,
"limitTotalUncompressedAppsSizeInMB": 5000
}
}
[06/09/2025 07:24:12] Starting work item 7182a8202f4649da9fa9867db5a889d8
[06/09/2025 07:24:13] Start download phase.
[06/09/2025 07:24:13] Start downloading input: verb - 'Get', url - 'urn:adsk.objects:os.object:test-sandbox-lkwej7xpbgp63x4hl335y6m26oakggof/racbasicsampleproject.rvt'
[06/09/2025 07:24:13] Embedded resource [{"exportSettingName":"My IFC Export Setup", "viewId": "44745acb-ebea-4fb9-a091-88d28bd746c7-000ea86d"}] is saved as a file in 'Unicode' at: 'T:\Aces\Jobs\7182a8202f4649da9fa9867db5a889d8\params.json'.
[06/09/2025 07:24:14] End downloading file. Source=urn:adsk.objects:os.object:.../racbasicsampleproject.rvt,LocalFile=T:\Aces\Jobs\7182a8202f4649da9fa9867db5a889d8\input.rvt,BytesDownloaded=19775488,Duration=1124ms
[06/09/2025 07:24:14] End download phase successfully.
[06/09/2025 07:24:14] Start preparing script and command line parameters.
[06/09/2025 07:24:14] Command line: [ /i "T:\Aces\Jobs\7182a8202f4649da9fa9867db5a889d8\input.rvt" /al "T:\Aces\Applications\f78658aed9a5567f7b8c2ff8a98b9865.Kangs.TestSandboxApp[1].package"]
[06/09/2025 07:24:14] End preparing script and command line parameters.
[06/09/2025 07:24:14] Start script phase.
[06/09/2025 07:24:14] Start Revit Core Engine standard output dump.
[06/09/2025 07:24:14] ====== Revit is running: revitcoreconsole ======
[06/09/2025 07:24:14] Current Exe path: T:\Aces\AcesRoot\25.0\coreEngine\Exe\revitcoreconsole.dll
[06/09/2025 07:24:14] Echoing command line args:
[06/09/2025 07:24:14] 0:/i
[06/09/2025 07:24:14] 1:T:\Aces\Jobs\7182a8202f4649da9fa9867db5a889d8\input.rvt
[06/09/2025 07:24:14] 2:/al
[06/09/2025 07:24:14] 3:T:\Aces\Applications\f78658aed9a5567f7b8c2ff8a98b9865.Kangs.TestSandboxApp[1].package
[06/09/2025 07:24:14] 4:/isolate
[06/09/2025 07:24:14] 5:HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_7182a8202f4649da9fa9867db5a889d8
[06/09/2025 07:24:14] 6:T:\Aces\Jobs\7182a8202f4649da9fa9867db5a889d8\userdata
[06/09/2025 07:24:14] Selected Revit\RCE install Path: (from app.config)
[06/09/2025 07:24:14] Resolving location of Revit/RevitCoreEngine installation...
[06/09/2025 07:24:14] Loading RCE ....
[06/09/2025 07:24:18] Running user application....
[06/09/2025 07:24:18] Found an addIn for registration: RevitDaSadnbox.addin
[06/09/2025 07:24:18] Language not specified, using English-United States(ENU) as default.
[06/09/2025 07:24:24] Quickdraw APS Plugin OnStartup
[06/09/2025 07:24:24] Get RCE: (VersionBuild) 25.3.0.46 (VersionNumber) 2025 (SubVersionNumber) 2025.3
[06/09/2025 07:24:30] Hello World! In the try/catch
[06/09/2025 07:24:31] Quickdraw APS Plugin OnShutdown
[06/09/2025 07:24:47] Finished running. Process will return: Success
[06/09/2025 07:24:47] ====== Revit finished running: revitcoreconsole ======
[06/09/2025 07:24:48] End Revit Core Engine standard output dump.
[06/09/2025 07:24:48] End script phase.
[06/09/2025 07:24:48] Start upload phase.
[06/09/2025 07:24:48] Error: Non-optional output [result.pdf] is missing.
[06/09/2025 07:24:48] Error: An unexpected error happened during phase Publishing of job.
[06/09/2025 07:24:49] Job finished with result FailedMissingOutput
[06/09/2025 07:24:49] Job Status:
{
"status": "failedInstructions",
"reportUrl": "...",
"debugInfoUrl": "...",
"activityId": "Kangs.TestSandboxAppActivity+dev",
"stats": {
"timeQueued": "2025-06-09T07:24:12.7714684Z",
"timeDownloadStarted": "2025-06-09T07:24:12.9206665Z",
"timeInstructionsStarted": "2025-06-09T07:24:14.1269735Z",
"timeInstructionsEnded": "2025-06-09T07:24:48.6570173Z",
"timeUploadEnded": "2025-06-09T07:24:48.6581428Z",
"bytesDownloaded": 19775590
},
"id": "7182a8202f4649da9fa9867db5a889d8"
}
In your workitem report, I can see this error, which means somewhere in your code returns false to "e.Succeeded".
[05/27/2025 14:38:19] Finished running. Process will return: TestError
So, I would advise you to test with Revit Desktop to see if it works without any problem locally with https://github.com/autodesk-platform-services/aps-design.automation-csharp-revit.local.debug.tool first.