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辅助器手机版下载,pokermaster修改器(透视)教你教程(有挂存在)-哔...
据相关数据显示!凑一桌游戏辅助... 据相关数据显示!凑一桌游戏辅助器怎么安装,wepoker有辅助功能吗,窍门教程(详细教程)-哔哩哔哩...
据文件显示!hhpoker视频... 据文件显示!hhpoker视频巡查真的假的,hhpoker有没有辅助辅助(透视)教你教程(今日头条)...
透视插件!智星德州插件最新版本... 透视插件!智星德州插件最新版本更新内容详解,哈糖大菠萝辅助器(透视)分享教程(的确有挂)-哔哩哔哩1...
长期以来!wepoker透视方... 长期以来!wepoker透视方法,微乐家乡破解版,机巧教程(有挂教学)-哔哩哔哩1、操作简单,无需微...
透视美元局!红龙poker辅助... 透视美元局!红龙poker辅助平台,wepoker辅助透视软件(透视)解迷教程(有挂方式)-哔哩哔哩...
今日!开心泉州辅助器app下载... 今日!开心泉州辅助器app下载,微信小程序微乐辅助器真吗,绝活儿教程(有挂详情)-哔哩哔哩微信小程序...
最新消息!有没有人wepoke... 最新消息!有没有人wepoker,哈糖大菠萝开挂(透视)透视教程(真是有挂)-哔哩哔哩1、上手简单,...
据目击者称!小唐家乐园辅助器,... 据目击者称!小唐家乐园辅助器,德普之星透视辅助插件,操作教程(有挂工具)-哔哩哔哩进入游戏-大厅左侧...
随着!德州透视是真的吗,德普之... 随着!德州透视是真的吗,德普之星的辅助工具介绍(透视)揭幕教程(有挂猫腻)-哔哩哔哩1、完成德普之星...