0

When I executed a WorkItem, I have this error:

[07/18/2019 09:24:00] Error: Non-optional output [outputFile.dwg] is missing .

[07/18/2019 09:24:00] Error: An unexpected error happened during phase Publishing of job.

In Activity I have the follow code:

    "outputFile": {
        "zip": false,
        "ondemand": false,
        "verb": "put",
        "description": "output file",
        "localName": "outputFile.dwg",
        "required": "true"
    }

And in WorkItem:

    "outputFile": {
        "url": "https://developer.api.autodesk.com/oss/v2/buckets/{{ TokenKey}}/objects/outputFile.dwg",
        "headers": {
            "Authorization": "Bearer {{ oAuthToken  }}",
            "Content-type": "application/octet-stream"
        },
        "verb": "put"
    },

What may be change?

Community
  • 1
  • 1
Beth
  • 1
  • 1

2 Answers2

1

The error says that "outputFile.dwg" was not generated. It is a non-optional (i.e. required) output so this is an error. I suspect there's something wrong with your script. Look higher up in the report to see if you can find something that gives you a clue.

Albert Szilvasy
  • 461
  • 3
  • 5
  • There isn't another error in the code. If I quit the code about outputfile in Activity and WorkItem, the response is "status": "success", but I need obvioly a outfile to see the results of command execution. What can I do? I think that there's something worng in the code. – Beth Jul 22 '19 at 08:37
  • Could it be that "outputFile.dwg" is saved in a subfolder and not the root assigned to the WorkItem? Could you show the code part generating "outputFile.dwg"? – Adam Nagy Jul 23 '19 at 18:26
  • Here You have the report to Execute WorkItem – Beth Jul 24 '19 at 09:51
  • Where is "here"? Also, I was asking about the code inside your add-in (uploaded as app bundle) which is saving/generating outputPut.dwg to make sure it's not saving it in the wrong location. – Adam Nagy Jul 25 '19 at 09:26
  • The outputFile.dwg and the file to make changes I upload in a bucket and I used the https://developer.api.autodesk.com/oss/v2/buckets/{{BucketKey}}/objects/{{dwg name}} url in the WorkItem with the Authorization. The WorkItem load well the inputfile, but the outputfile, no. – Beth Jul 26 '19 at 07:16
  • In the packagecontests.xml I have nothing about outputfile, I have the follow code in componets: – Beth Jul 26 '19 at 07:19
1

this is Qun Lu from Forge Design Automation / AutoCAD team. The execution of your activity (with your input arguments as inputs) has to generate the expected result file, in your case, "outputFile.dwg", so it can be uploaded using your URL. It should be done by your "Rota" command, or other AutoCAD built-in command that your script in activity specifies. It appears that either your command (or script in general) missed the step of saving the drawing as "outputFile.dwg", or your "PluginPrueba.dll" module did not load properly hence the "Rota" command is not found. Can you give us the full report so we can check further? You can also ping me at qun.lu@autodesk.com. Thanks!

Qun Lu
  • 31
  • 1
  • Hello! I send you a email with the WorkItem report, but I have another questions: I understand through your words that I need a VBA command to save the result of command execution... It's necessary too a command to open the dwg file to makes changes?? At first I thought that the input and output files only have necessary in the Activity definition, and the path definition in the WorkItem.... and that the commands created in VBA, were only to make modification in the input file. – Beth Jul 29 '19 at 09:24
  • 1
    Hi Beth, I replied directly to you via email. To summarize, the problem is the use of "_qsave" in script to save the drawing change and the "outputFile.dwg" file was never generated. In this case, "_saveas" command should be used to "outputFile.dwg". – Qun Lu Jul 29 '19 at 18:36