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 的支持团队。

相关内容

热门资讯

透视揭露"wepok... 透视揭露"wepoker破解游戏盒子"好像是有辅助工具(哔哩哔哩)1、玩家可以在wepoker破解游...
透视开挂"哈糖大菠萝... 透视开挂"哈糖大菠萝辅助器"都是有辅助神器(哔哩哔哩)1、哈糖大菠萝辅助器辅助软件下载优化,哈糖大菠...
透视揭幕"hhpok... 透视揭幕"hhpoker有没有作必弊辅助"总是存在有辅助技巧(哔哩哔哩)1、不需要AI权限,帮助你快...
透视有挂"德扑圈透视... 透视有挂"德扑圈透视挂"一直是有辅助app(哔哩哔哩)1.德扑圈透视挂 选牌创建新账号,点击进入游戏...
透视开挂"德普之星辅... 透视开挂"德普之星辅助工具如何打开"其实真的是有辅助插件(哔哩哔哩)1、玩家可以在德普之星辅助工具如...
透视分享"wejok... 透视分享"wejoker辅助软件视频"一直是真的辅助方法(哔哩哔哩)1、进入游戏-大厅左侧-新手福利...
透视揭幕"pokem... 透视揭幕"pokemmo脚本辅助下载"总是是真的辅助教程(哔哩哔哩)该软件可以轻松地帮助玩家将pok...
透视开挂"wepok... 透视开挂"wepoker插件下载"本来真的有辅助app(哔哩哔哩)wepoker插件下载透视方法中分...
透视科普"德普之星辅... 透视科普"德普之星辅助工具如何设置"切实是有辅助脚本(哔哩哔哩)1)德普之星辅助工具如何设置有没有挂...
透视科普"wepok... 透视科普"wepoker轻量版有透视吗"果然是真的辅助软件(哔哩哔哩)wepoker轻量版有透视吗能...