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

相关内容

热门资讯

开挂辅助脚本"fis... 开挂辅助脚本"fishpoker透视"开挂(透视)辅助神器(有挂教学);无需打开直接搜索加薇1367...
开挂辅助脚本"拱趴大... >>您好:拱趴大菠萝机器人确实是有挂的,很多玩家在这款拱趴大菠萝机器人游戏中打牌都会发现很多用户的牌...
开挂辅助工具"拱趴大... 开挂辅助工具"拱趴大菠萝自动计算机器人"开挂(透视)辅助插件(有挂方式);无需打开直接搜索加薇136...
开挂辅助工具"哈糖大... 开挂辅助工具"哈糖大菠萝有没有挂"开挂(透视)辅助下载(有挂讲解);无需打开直接搜索微信(13670...
开挂辅助安装"wep... 开挂辅助安装"wepoker插件程序激活码"开挂(透视)辅助神器(有挂技巧)>>您好:软件加1367...
开挂辅助下载"wep... 开挂辅助下载"wepoker有没有挂"开挂(透视)辅助工具(有挂秘籍)【无需打开直接搜索加薇1367...
开挂辅助工具"hhp... 开挂辅助工具"hhpoker有没有辅助"开挂(透视)辅助下载(有挂分析)hhpoker有没有辅助ai...
开挂辅助插件"wep... 开挂辅助插件"wepoker透视脚本"开挂(透视)辅助软件(有挂技术);打开点击测试直接进入微信(1...
开挂辅助安装"约局吧... 开挂辅助安装"约局吧透视挂下载"开挂(透视)辅助工具(了解有挂)>>您好:软件加薇136704302...
开挂辅助脚本"wep... 开挂辅助脚本"wepoker怎么设置透视"开挂(透视)辅助插件(有挂教程)>>您好:软件加13670...