AutodeskForge创建应用程序无法正常工作。
创始人
2024-11-12 10:00:24
0

首先,确保你有一个有效的 Forge 应用程序和访问密钥。然后,可以尝试以下步骤来解决问题:

1.检查代码中使用的 Forge API 版本是否与你的应用程序和访问密钥兼容。如果不是,请更新代码中的 API 版本。

2.使用 Forge 开发人员工具箱(Toolkit)对你的代码进行测试。这将帮助你确定问题所在,找到并修复错误。

以下是使用 Forge 工具箱中的 JavaScript 示例代码:

var authentication = require('./credentials');
var forgeSDK = require('forge-apis');

var oAuth2TwoLegged = new forgeSDK.AuthClientTwoLegged(
    authentication.client_id,
    authentication.client_secret,
    authentication.scope);

oAuth2TwoLegged.authenticate()
    .then(function(credentials){

        // Initialize the DerivativesApi object
        var derivativesApi = new forgeSDK.DerivativesApi();
        derivativesApi.apiClient.basePath = "https://developer.api.autodesk.com";

        var urn = 'your_urn_here';

        // Submit a translate job for the object stored in bucket
        var postJob = new forgeSDK.JobPayload();
        postJob.input = new forgeSDK.JobPayloadInput();
        postJob.input.urn = urn;

        postJob.output = new forgeSDK.JobPayloadOutput([
            new forgeSDK.JobSvfOutputPayload()
        ]);
        postJob.output.formats[0].type = "svf";
        postJob.output.formats[0].views = ["2d", "3d"];

        return derivativesApi.translate(postJob, {}, oAuth2TwoLegged, credentials);
    })
    .then(function(response){
        console.log('Translating your file to SVF. Please wait...');
    })
    .catch(function(err){
        console.error('Error translating your file to SVF:', err);
    });

如果这些步骤无法解决问题,你还可以查看 Forge 的开发者文档和论坛,或者联系 Forge 的支持团队。

相关内容

热门资讯

透视真的!pokemmo内置修... 透视真的!pokemmo内置修改器,wepoker永久免费脚本“曝光开挂透视挂辅助技巧”1、wepo...
透视计算!淘宝买wepoker... 透视计算!淘宝买wepoker透视有用,hhpoker透视挂码可以用“详细开挂透视挂辅助教程”hhp...
透视新版!wepoker私人局... 透视新版!wepoker私人局开挂视频,xpoker透视辅助“科普开挂透视挂辅助方法”小薇(透视辅助...
透视安卓版!wepoker透视... 透视安卓版!wepoker透视底牌,aapoker脚本“推荐开挂透视挂辅助方法”小薇(透视辅助)致您...
透视能赢!wepoker透视挂... 透视能赢!wepoker透视挂辅助,德普之星透视软件免费入口官网“曝光开挂透视挂辅助攻略”该软件可以...
透视透视!pokemmo脚本辅... 透视透视!pokemmo脚本辅助,wpk俱乐部是真的“普及开挂透视挂辅助攻略”1、不需要AI权限,帮...
透视辅助!aapoker辅助器... 透视辅助!aapoker辅助器可以用,xpoker可以透视挂“揭露开挂透视挂辅助攻略”1、任何aap...
透视模拟器!wepoker有机... 透视模拟器!wepoker有机器人,hhpoker辅助软件是真的么“分享开挂透视挂辅助技巧”小薇(透...
透视真的!wpk插件,poke... 透视真的!wpk插件,pokerworld破解版下载“曝光开挂透视挂辅助插件”一、pokerworl...
透视透视!we poker插件... 透视透视!we poker插件,wepoker永久免费脚本“解密开挂透视挂辅助插件”所有人都在同一条...