您好,我正在努力寻找有关如何将 DWG 文件转换为 PDF 文件的工作示例。我正在使用 Autodesk Design Automation API 和 Dropbox。我尝试使用以下命令来放置 WorkItem
{
"Arguments":{
"InputArguments":[
{
"Resource": "https://content.dropboxapi.com/2/files/download",
"Name": "HostDwg",
"Headers":[
{
"Name":"Authorization",
"Value":"Bearer xxxxxxxxxxxxxxxxxxxxxxxx"
},{
"Name":"Dropbox-API-Arg",
"Value" : {"path":"/original.dwg"}
}
]
}
],
"OutputArguments":[
{
"Name": "Result",
"HttpVerb": "PUT",
"Resource": "https://content.dropboxapi.com/2/files/upload",
"StorageProvider": "Generic",
"Headers":[
{
"Name":"Authorization",
"Value":"Bearer xxxxxxxxxxxxxx"
},{
"Name":"Dropbox-API-Arg",
"Value": {"path":"/test.pdf"}
}
]
}
]
}, "ActivityId": "PlotToPDF","Id": ""}
不幸的是,我收到以下错误消息
An unexpected 'StartObject' node was found for property named 'Value' when reading from the JSON reader. A 'PrimitiveValue' node was expected.
我认为这与我定义的第二个 Header 有关,以指定要下载或上传的文件。我不清楚如何正确设置此值。如果我使用的是没有设计自动化 API 的 Dropbox api,这是可行的。我可以定义一个名为 Dropbox-API-Arg 的 Header 并定义下载/上传路径。
任何帮助,将不胜感激。谢谢