【发布时间】:2021-06-19 02:29:38
【问题描述】:
我想创建一个公开的Design Automation Activity 和 Package,以便其他具有未知 ClientId 和 Secret 的 Forge 应用程序可以使用我们的公司 DA 工具。所以我在有效载荷上设置了isPublic: true 标志,但令我非常绝望的是,它不起作用。
看看我下面的POST activity有效载荷:
const activityParams = {
id: DA_ACTIVITY_ID,
commandLine: [
`$(engine.path)\\accoreconsole.exe ` +
`/i \"$(args[inputDwg].path)\" ` +
`/al \"$(appbundles[${DA_APP_BUNDLE_ID}].path)\" ` +
`/s \"$(settings[script].path)\"`
],
parameters: {
inputDwg: {
description: "input .dwg",
localName: "input.dwg",
ondemand: false,
required: true,
verb: "get",
zip: false
},
result: {
description: "result .json",
localName: "result.json",
ondemand: false,
required: false,
verb: "put",
zip: false
}
},
settings: {
script: "(command \"EXTRACTGEOBIMDATA\")\n"
},
description: "GeoBIM Extract Data",
engine: DA_ENGINE,
appbundles: [
fullAppBundleId
],
isPublic: true
}
我注意到的第一件事是成功创建活动后的响应不包含isPublic字段:
我不得不注意的第二件事是尝试针对该活动执行工作项会导致错误:
请注意,当使用相同的凭据运行时,活动和工作项运行良好。
【问题讨论】:
-
isPublic是 DA V2 的功能,V3 中没有,需要与大家分享活动。这是新的工作流程,但我们默认允许 0 个公共共享。 forge.autodesk.com/en/docs/design-automation/v3/reference/http/… -
谢谢伙计,那么你是如何在伪造应用程序之间创建共享的呢?我只是在那里看到一个 GET 端点?
标签: autodesk-forge autodesk autodesk-designautomation