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

相关内容

热门资讯

透视脚本"wpk辅助... 《透视脚本"wpk辅助插件"详细辅助AA德州教程(透视辅助下载方法)》 wpk辅助插件软件透明挂更新...
透视真的"德州辅助工... 透视真的"德州辅助工具到底怎么样"详细辅助安装教程(有辅助教程);德州辅助工具到底怎么样软件透明挂作...
透视教学"wepok... 这是一款非常优秀的wepoker私人局外卦 ia辅助检测软件,能够让你了解到wepoker私人局外卦...
透视存在"德州局透视... 透视存在"德州局透视脚本免费版下载手机版"详细辅助线上教程(游戏下载软件)是一款可以让一直输的玩家,...
透视能赢"hardr... 透视能赢"hardrock作弊"详细辅助透视教程(私人局俱乐部辅助透视)是一款可以让一直输的玩家,快...
透视模拟器"wpk刷... 1、透视模拟器"wpk刷入池率脚本"详细辅助软件教程(代打辅助技巧);详细教程。2、wpk刷入池率脚...
透视游戏"德普辅助器... 透视游戏"德普辅助器辅助器怎么用"详细辅助新2025教程(如何下载安装包方法);支持多人共享记分板与...
透视规律"pokem... 透视规律"pokemmo辅助器脚本下载"详细辅助可靠教程(免费透视方法)是一款可以让一直输的玩家,快...
透视好友"We po... 透视好友"We poker辅助器下载"详细辅助系统教程(辅助器安装包辅助);支持2-10人实时对战,...
透视线上"werpl... 透视线上"werplan透视挂"详细辅助分享教程(透视脚本网页技巧);werplan透视挂软件透明挂...