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

相关内容

热门资讯

盘点辅助!hhpoker辅助实... 盘点辅助!hhpoker辅助实战视频,新道游科技透视免费版下载网页,开挂(透视)辅助软件(有挂教学)...
曝光辅助!aapoker俱乐部... 曝光辅助!aapoker俱乐部靠谱吗,小程序能不能开挂,开挂(透视)辅助神器(有挂方法)相信很多朋友...
推荐开挂!hhpoker德州有... 推荐开挂!hhpoker德州有挂吗,三加一辅助,开挂(透视)辅助平台(有挂秘籍);三加一辅助是一种具...
带你了解"wepok... 【福星临门,好运相随】;带你了解"wepoker辅助器软件下载"开挂(透视)哈糖大菠萝有挂吗(有挂教...
实测开挂!wepoker模拟器... 实测开挂!wepoker模拟器哪个,新漫游免费辅助器,开挂(透视)辅助脚本(有挂实锤);新漫游免费辅...
盘点开挂!wepoker游戏安... 盘点开挂!wepoker游戏安装教程,好友赣南新版本挂,开挂(透视)辅助插件(有挂透视);好友赣南新...
科技辅助!wepoker有没有... 科技辅助!wepoker有没有挂,约战竞技场辅助软件,开挂(透视)辅助安装(确实有挂);亲真的是有正...
实测辅助!pokernow辅助... 实测辅助!pokernow辅助控制,皇豪互众辅助软件是干嘛的,开挂(透视)辅助平台(有挂秘诀);皇豪...
辅助开挂!扣点点脚本辅助器,w... 辅助开挂!扣点点脚本辅助器,we-poker靠谱吗(透视)开挂辅助神器(有挂教程);是一款可以让一直...
传授开挂!wepoker好友局... 传授开挂!wepoker好友局透视,海南琼崖海海南辅助,开挂(透视)辅助安装(有挂攻略);一、海南琼...