0

I am trying to integrate the Autodesk Viewer into my website. I just want the users to see 2d or 3d view of files stored at my account of Autodesk. I went through the whole documentation but it's a bit hard for me to understand how is it working. There are 4 steps: 1) Authentication code 2) Model Derivative 3) Data Management 4) Viewer. I am confused that if I have to run these codes again and again or just once to get authorization code, create bucket, upload objects to bucket, convert to svf format and render on browser. I am not familiar about it, as I am working with a php based project. I went through both these links: https://aps.autodesk.com/developer/idea/viewer-app & https://aps.autodesk.com/en/docs/viewer/v7/developers_guide/overview/ . But I don't know where to start or how should I code or whatever. Please help me out with this

Help me out please...

1 Answers1

0

In below link, you can find more detailed step by step tutorial to buidl simple viewer application. https://tutorials.autodesk.io/

Basically step 1) to 3) is for to traslate source file, e.g. .dwg .rvt, ipt .etc, into vieweable file for Autodesk Viewer. So if you already have translated viewable file URN, you just simply view it with Autodesk Viewer.

Hope this will help to understand.

Regards, Takehiro

Takehiro Kato
  • 206
  • 2
  • 1
  • I went through this too but I am not familiar whether I have to translate the file again and again when the file is uploaded or I have to translate it only once. And please let me know if there is any PHP SDK available for Autodesk Viewer integration. Can you please make me understand how this actually works? I need to understand how all this process works. I only know that the file will be uploaded to Autodesk server and that's it. Please be more specific. Thanks! – Mohammad Ali Mar 02 '23 at 04:52
  • For PHP you can find samples and SDK in below links. https://aps.autodesk.com/blog/basic-usage-forge-sdk-php https://github.com/Autodesk-Forge/forge-php-client https://github.com/cyrillef/simple-forge-php-sample Unfortunately, the PHP SDK is not updated for latest change, so called direct s3 approach, in Data Management API. So you need to adapt it by yourself. Please see blow link in detail. https://aps.autodesk.com/blog/data-management-oss-object-storage-service-migrating-direct-s3-approach – Takehiro Kato Mar 03 '23 at 02:30
  • Regarding translation, once you upload source file to OSS bucket and translate it, with Data Management and Model derivative API, you can get objectId of the file. With the objectId, APS Viewer can load and render it. So you just need to get objectId to render it in viewer in second time. Of course, you need to re-upload and re-translate if you modify source file in local and want to view the change in viewer. I think you can get more detail if you dig into tutorial source code or PHP sample. Thanks. – Takehiro Kato Mar 03 '23 at 02:30
  • I have downloaded the node js setup from Github and it's working well on local server. But I have to deploy it online into cpanel. I am working with CodeIgniter, a PHP framework. I want to deploy and make it work with that project. So can you please let me know how can it be done. Please reply my asap! – Mohammad Ali Mar 04 '23 at 14:26
  • I think there is no easy/quick way to porting node.js application to PHP application. So you need to understand how the node.js sample is working, also what APS API is used in behind, and develop application on your prefered PHP framework. – Takehiro Kato Mar 05 '23 at 23:31