传递多个输入文件时出错,Design Automation Revit点网核心

时间:2020-06-13 07:57:55

标签: ajax .net-core autodesk-forge autodesk-data-management autodesk-designautomation

我问了我的最后一个问题。我有一个rfa文件和一个更大的JSon文件作为输入。当我调试时,看起来完美地传递了所有值,直到最后一行:

1 个答案:

答案 0 :(得分:3)

我注意到您的活动将“ inputFile” /“ inputJsonFile”的“ localName”定义为“ $(inputFile)” /“ $(inputJsonFile)”

Parameters = new Dictionary<string, Parameter>()
 {
     { "inputFile", new Parameter() { Description = "input file", LocalName = "$(inputFile)", Ondemand = false, Required = true, Verb = Verb.Get, Zip = false } },
     { "inputJsonFile", new Parameter() { Description = "input Json file", LocalName = "$(inputJsonFile)", Ondemand = false, Required = true, Verb = Verb.Get, Zip = false } }
 }

解决作业过程中输入的命名问题可能会导致一些问题。我建议您提供一个具体的文件名作为WorkItem参数的本地名称,然后重试。例如:

XrefTreeArgument inputJsonArgument = new XrefTreeArgument()
{
      Url = string.Format("https://developer.api.autodesk.com/oss/v2/buckets/{0}/objects/{1}", bucketKey, inputFileNameOSS1),
      Headers = new Dictionary<string, string>()
      {
         { "Authorization", "Bearer " + oauth.access_token }
      },
      // Note: if your appbunldes(addin) uses this json, this is the name your addin should know 
      LocalName = "inputJson.json" 
};