I am trying to post a WorkItem using v2 of the Design Automation API and forge-api-nodejs-client
. The WorkItem takes a json file as an input parameter. The custom .NET plugin that I've created, depends on the json file.
The WorkItem fails due to FailedMissingOutput
. I printed out the report and noticed this...
[02/11/2019 19:14:48] Command: DRAWMARKUPS
[02/11/2019 19:14:49] ************************MessageBox****************************
[02/11/2019 19:14:49] AutoCAD Error Aborting
[02/11/2019 19:14:49] FATAL ERROR: Unhandled Access Violation Reading 0x0008 Exception at 82480c14h
[02/11/2019 19:14:49] >>>Responding: OK.
[02/11/2019 19:14:49] **************************************************************
[02/11/2019 19:14:49] ************************MessageBox****************************
[02/11/2019 19:14:49] AutoCAD Error-abort
[02/11/2019 19:14:49] Error handler re-entered. Exiting now.
[02/11/2019 19:14:49] >>>Responding: OK.
[02/11/2019 19:14:49] **************************************************************
[02/11/2019 19:14:49] End AutoCAD Core Engine standard output dump.
[02/11/2019 19:14:50] Error: AutoCAD Core Console output contains error(s).
[02/11/2019 19:14:50] End script phase.
[02/11/2019 19:14:50] Start upload phase.
[02/11/2019 19:14:50] Error: Non-optional output [a57863c8-3085-4bc2-90b6-709595f1c566.dwg.dwg] is missing .
[02/11/2019 19:14:50] Error: An unexpected error happened during phase Publishing of job.
[02/11/2019 19:14:50] Job finished with result FailedMissingOutput
Here are the lines in my .NET plugin that might be breaking it...
string drawingName = Path.GetFileName(acDoc.Name);
...
// Read input parameters from JSON file
JArray jArray = JArray.Parse(File.ReadAllText("markups.json"));
...
acCurDb.SaveAs(drawingName, DwgVersion.AC1027);
Also, I'm not including any CommandLineParameters
in Instruction
object in the definition of my Activity.
const activityObject = {
id: id,
instruction: {
CommandLineParameters: null,
Script: `${script}`
},
appPackages: appPackages,
requiredEngineVersion: `20.1`,
parameters: {
InputParameters: [{
Name: `HostDwg`,
LocalFileName: `$(HostDwg)`
}],
OutputParameters: [{
Name: outPutFilename,
LocalFileName: `${outPutFilename}.dwg`
}]
},
allowedChildProcesses: [],
version: 1,
isPublic: true,
theData: null,
obj: null
};
I suspect that I'm missing the right CommandLineParameters
from my Activity Definition, but I have no idea what those should be be.
Why is my WorkItem failing? Is it the Activity, or the plugin? And, how can I fix this?
Update: I fixed the .dwg.dwg
typo in the output filename. Now the WorkItem succeeds, but I still get the Unhandled Access Violation
error. Also, my script doesn't seem to be reading in the json file. The plugin works locally, so I still don't know what's up.