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破解器... 您好,这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302】很多玩家在这款游戏中打...
为切实保障!wepoker轻量... 为切实保障!wepoker轻量版书签,微乐锄大地脚本,有挂透视(有人有挂)-哔哩哔哩wepoker轻...
现场直击!pokemmo辅助器... 现场直击!pokemmo辅助器脚本下载,微信微乐开挂,揭露透视(揭秘有挂)-哔哩哔哩pokemmo辅...
脚本关于!德扑圈透视,德普之星... 脚本关于!德扑圈透视,德普之星透视辅助软件是真的吗(透视)总是存在有方法(哔哩哔哩)1、进入到是否有...
辅助透视!wepoker透视苹... 辅助透视!wepoker透视苹果系统,微乐小程序辅助器脚本,曝光脚本(有挂秘籍)-哔哩哔哩1、玩家可...
脚本开挂!购买的wpk辅助在哪... 脚本开挂!购买的wpk辅助在哪里下载,wpk透视辅助下载(透视)好像是有软件(哔哩哔哩)1、玩家可以...
透视科普!hhpoker是真的... 透视科普!hhpoker是真的还是假的,hhpoker到底可以作必弊吗(透视)一直有器(哔哩哔哩)1...
更值得关注的是!wepoker... 更值得关注的是!wepoker一直输的号能继续打吗,微乐贵阳捉鸡麻将辅助,关于脚本(有挂规律)-哔哩...
脚本了解!hhpoker辅助挂... 脚本了解!hhpoker辅助挂,hhpoker视频巡查真的假的(透视)真是存在有技巧(哔哩哔哩)脚本...
透视数据!aapoker怎么设... 透视数据!aapoker怎么设置提高好牌几率,微乐游戏竞技团辅助,详细透视(有挂秘诀)-哔哩哔哩1、...