How can I create an activity for data conversion in Design Automation API?

后端 未结 1 1629
一整个雨季
一整个雨季 2021-01-28 05:27

I\'m prototyping a web service to convert data using Design Automation API in Autodesk Forge.

My approach is to invoke an activity that executes a script to import a tar

相关标签:
1条回答
  • 2021-01-28 05:33

    You can use the Activity “Translate-STEP2DWG". It takes a .stp file as input and generate result.dwg as output. This is a public activity that anybody can send workitems against to it.

    The activity is defined like this:

    {
          "Id": "Translate-STEP2DWG",
          "AppPackages": [],
          "HostApplication": "AcTranslators.exe",
          "RequiredEngineVersion": "22.0",
          "Parameters": {
            "InputParameters": [
              {
                "Name": "HostDwg",
                "LocalFileName": "source.stp"
              }
            ],
            "OutputParameters": [
              {
                "Name": "Result",
                "LocalFileName": "result.dwg"
              }
            ]
          },
          "Instruction": {
            "CommandLineParameters": "-i source.stp -o result.dwg",
            "Script": ""
          },
          "AllowedChildProcesses": [
          ],
          "IsPublic": true,
          "Version": 1,
          "Description": ""
        }
    

    Here is a sample workitem request body:

    {
      "ActivityId": "Translate-STEP2DWG",
      "Arguments": {
        "InputArguments": [
          {
            "Resource": "https://s3.amazonaws.com/AutoCAD-Core-Engine-Services/TestDwg/3DStep.stp",
            "Name": "HostDwg"
          }
        ],
        "OutputArguments": [
          {
            "Name": "Result",
            "HttpVerb": "POST"
          }
        ]
      }
    }
    
    0 讨论(0)
提交回复
热议问题