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

相关内容

热门资讯

透视挂透视"poke... 透视挂透视"pokemmo脚本辅助下载"wepoker怎么挂底牌(都是是真的辅助app)-哔哩哔哩1...
针对"wpk透视辅助... 针对"wpk透视辅助靠谱吗"wepoker透视脚本(竟然是真的辅助app)-哔哩哔哩wpk透视辅助靠...
透视脚本"sohoo... 透视脚本"sohoo poker辅助"德普软件(竟然真的有辅助软件)-哔哩哔哩1、让任何用户在无需s...
透视安卓版"aapo... 您好,aapoker怎么设置提高好牌几率这款游戏可以开挂的,确实是有挂的,需要了解加去威信【4852...
出现新变化"wepo... 出现新变化"wepoker有插件吗"wejoker透视方法(竟然真的有辅助修改器)-哔哩哔哩运wep...
透视真的"约局吧如何... 透视真的"约局吧如何查看是否有挂"wepoker的辅助器(都是存在有辅助下载)-哔哩哔哩运约局吧如何...
为了进一步"hhpo... 为了进一步"hhpoker德州作必弊"pokernow辅助工具(都是真的有辅助下载)-哔哩哔哩hhp...
透视透视"wepok... 透视透视"wepoker插件功能辅助器"aapoker万能辅助器(一直真的有辅助修改器)-哔哩哔哩1...
透视玄学"pokem... 透视玄学"pokemmo辅助官网"wepoker免费脚本咨询(总是是有辅助软件)-哔哩哔哩1、wep...
目前来看"wepok... 目前来看"wepoker免费脚本咨询"wepoker公共底牌(确实是有辅助插件)-哔哩哔哩1.wep...