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

相关内容

热门资讯

透视教程书!破解辅助插件wep... 透视教程书!破解辅助插件wepoker(透视)都是有辅助平台(哔哩哔哩)运破解辅助插件wepoker...
透视资料!WePoKer辅助器... 透视资料!WePoKer辅助器(透视)其实有辅助神器(哔哩哔哩)1、全新机制【WePoKer辅助器a...
透视妙招!aapoker辅助软... 透视妙招!aapoker辅助软件合法吗(透视)都是真的是有辅助辅助器(哔哩哔哩)1、aapoker辅...
透视要领!wepoker挂(透... 透视要领!wepoker挂(透视)都是是有辅助下载(哔哩哔哩)1、进入游戏-大厅左侧-新手福利-激活...
透视经验!wepoker透视是... 透视经验!wepoker透视是真的吗(透视)果然真的有辅助神器(哔哩哔哩)wepoker透视是真的吗...
透视秘籍!wepoker透视脚... 透视秘籍!wepoker透视脚本免费app(透视)一直存在有辅助工具(哔哩哔哩)1、超多福利:超高返...
透视模块!德州之星扫描器(透视... 透视模块!德州之星扫描器(透视)都是有辅助辅助器(哔哩哔哩)运德州之星扫描器辅助工具,进入游戏界面。...
透视步骤!wepoker怎么获... 透视步骤!wepoker怎么获得好牌(透视)都是存在有辅助软件(哔哩哔哩)1、金币登录送、破产送、升...
透视法门!福建大菠萝万能辅助器... 透视法门!福建大菠萝万能辅助器(透视)都是是真的辅助软件(哔哩哔哩)1、透视法门!福建大菠萝万能辅助...
透视要领!pokeplus脚本... 透视要领!pokeplus脚本(透视)本来有辅助安装(哔哩哔哩)1、pokeplus脚本透视辅助软件...