AutodeskForge欧洲服务器用于设计自动化
创始人
2024-11-12 10:30:20
0

首先,需要在Autodesk Forge上注册一个账户获取access token来访问API。然后,使用以下代码示例创建一个新的设计自动化活动并将其分配到欧洲服务器:

import requests
import json

# Replace YOUR_ACCESS_TOKEN with your actual access token
headers = {'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json'}

# The design automation activity payload
data = {
    "id": "MyActivity",
    "commandLine": "$(engine.path)\\InventorCoreConsole.exe /i $(args[inputFile].path) /al $(appbundles[MyApp].path)",
    "parameters": {
        "inputFile": {
            "verb": "get",
            "description": "Input Inventor file",
            "required": true,
            "localName": "$(args[inputFile].path)"
        }
    },
    "engine": "Autodesk.Inventor+23",
    "appbundles": ["MyApp+0.1"],
    "settings": {
        "script": {
            "value": "// Some script"
        }
    },
    "version": 1,
    "description": "My Activity"
}

# Make a POST request to create the activity and assign it to the European server
response = requests.post('https://developer.api.autodesk.com/da/us-east/v3/activities',
                         headers=headers, json=data)

此代码中,我们假设您在Autodesk Forge上已经创建了一个名为“MyApp”的应用程序包和复制了一个名为“InventorCoreConsole.exe”的程序文件到该应用程序包。

最后,我们使用以下代码示例提交一个新的设计自动化作业,并指定该作业在欧洲服务器上运行:

# The design automation job payload
data = {
    "activityId": "MyActivity",
    "arguments": {
        "inputFile": {
            "url": "",
            "localName": ""
        },
        "outputFile": {
            "verb": "put",
            "description": "Output Inventor file",
            "localName": "

相关内容

热门资讯

透视挂!aapoker辅助怎么... 透视挂!aapoker辅助怎么用(透视)开挂辅助挂(都是真的有挂)-哔哩哔哩1、让任何用户在无需aa...
透视透视!wepoker开脚本... 透视透视!wepoker开脚本视频,wepoker永久免费脚本,操作教程(本来存在有挂)-哔哩哔哩1...
透视规律!德扑之心免费透视(透... 透视规律!德扑之心免费透视(透视)开挂辅助app(原来是真的挂)-哔哩哔哩透视规律!德扑之心免费透视...
透视好牌!wepoker透视脚... 透视好牌!wepoker透视脚本免费下载,wpk俱乐部怎么辅助,阶段教程(一贯是有挂)-哔哩哔哩1、...
透视辅助!wpk模拟器是什么(... 透视辅助!wpk模拟器是什么(透视)开挂辅助app(好像真的是有挂)-哔哩哔哩1、下载好wpk模拟器...
透视能赢!aapoker免费透... 透视能赢!aapoker免费透视脚本,wepoker怎么开辅助,窍要教程(原来真的有挂)-哔哩哔哩1...
透视靠谱!wpk系统是否存在辅... 透视靠谱!wpk系统是否存在辅助行为(透视)开挂辅助攻略(一贯有挂)-哔哩哔哩1、让任何用户在无需w...
透视实锤!约局吧德州可以透视吗... 透视实锤!约局吧德州可以透视吗,黑侠破解wepoker,攻略教程(本来有挂)-哔哩哔哩1、约局吧德州...
透视胜率!wepoker可以透... 透视胜率!wepoker可以透视码(透视)开挂辅助软件(切实是有挂)-哔哩哔哩在进入wepoker可...
透视透视!hhpoker德州真... 透视透视!hhpoker德州真的假的,拱趴大菠萝万能挂,举措教程(切实有挂)-哔哩哔哩1、操作简单,...