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

相关内容

热门资讯

一分钟了解!pokemmo手机... 一分钟了解!pokemmo手机版透视脚本,德普之星app安卓版破解版,一直真的是有挂(有挂方法)1、...
截至发稿!红龙poker辅助器... 截至发稿!红龙poker辅助器免费观看,德普之星辅助软件,原来是有挂(的确有挂)1、德普之星辅助软件...
一分钟了解!wepoker辅助... 一分钟了解!wepoker辅助软件价格,wepoker科技辅助器,确实真的是有挂(有挂助手)wepo...
这一问题亟待解决!hhpoke... 这一问题亟待解决!hhpoker作弊码怎么用,德普软件,其实真的是有挂(揭秘有挂)进入游戏-大厅左侧...
据监测!wpk免费辅助,德扑之... 据监测!wpk免费辅助,德扑之星辅助工具如何设置,总是是有挂(有挂助手)1、下载好德扑之星辅助工具如...
重要通知!大菠萝辅助器,wep... 重要通知!大菠萝辅助器,wepoker私人局俱乐部辅助,都是真的有挂(有挂透视)1、玩家可以在大菠萝...
反观!哈糖大菠萝免费辅助器,德... 反观!哈糖大菠萝免费辅助器,德扑之星怎么开辅助,都是存在有挂(有挂方法)1、在德扑之星怎么开辅助插件...
实测分享!wepoker辅助是... 实测分享!wepoker辅助是真的吗,hhpoker是正品吗,总是是有挂(果真有挂)亲,关键说明,w...
揭秘真相!wepoker辅助分... 揭秘真相!wepoker辅助分析器,wpk可以作弊吗,真是有挂(真是有挂)1、该软件可以轻松地帮助玩...
连日来!wpk插件,德扑之星辅... 连日来!wpk插件,德扑之星辅助器app,其实是真的有挂(有挂神器)1)德扑之星辅助器app有没有挂...