我问了我的最后一个问题。我有一个rfa文件和一个更大的JSon文件作为输入。当我调试时,看起来完美地传递了所有值,直到最后一行:
答案 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"
};