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": "

相关内容

热门资讯

透视科技(WEPOKER)we... 透视科技(WEPOKER)wepokerplus透视脚本免费(透视)一贯是有挂(2025新版总结);...
透视app(wpk安卓下载辅助... 透视app(wpk安卓下载辅助)确实是真的有挂(透视)透视辅助方法(必备教程)所有人都在同一条线上,...
透视辅助(WEPOKER)we... 透视辅助(WEPOKER)wepoker透视脚本免费使用视频(透视)好像真的有挂(wpk教程);1、...
透视智能ai(有哪些免费的wp... 透视智能ai(有哪些免费的wpk作弊码)好像有挂(透视)模拟器(总结教程)1、操作简单,无需注册,只...
透视规律(wepoker)We... 透视规律(wepoker)We poker辅助器下载(透视)本来存在有挂(力荐教程)1)We pok...
透视有挂(wpk真的有透视嘛)... 透视有挂(wpk真的有透视嘛)本来是真的有挂(透视)透视辅助(扑克教程)1、用户打开应用后不用登录就...
透视最新(WEPOKER)we... 透视最新(WEPOKER)wepoker数据分析工具(透视)本来有挂(实用技巧)1、wepoker数...
透视肯定(如何判断wpk辅助软... 透视肯定(如何判断wpk辅助软件的真假)总是真的是有挂(透视)私人辅助(辅助教程)1、每一步都需要思...
透视透视(WePoKer)we... 透视透视(WePoKer)wepoker钻石怎么看底牌(透视)真是是有挂(揭秘攻略)wepoker钻...
透视脚本(wpk辅助是什么)一... 透视脚本(wpk辅助是什么)一直真的是有挂(透视)辅助购买(2025新版技巧)透视脚本(wpk辅助是...