27 Nov 2017
Showing files in the Viewer
In order to show a file in the Forge Viewer you need to:
1) Have the file on an Autodesk storage
2) Translate the file to SVF
3) Open the model in the Viewer
1) Have the file on an Autodesk storage
You can have the file on an Autodesk storage in two ways:
a) use an A360 type of storage account: Fusion Team, BIM 360 Team or BIM 360 Docs
In general, these require 3-legged authentication since the user needs to approve the Forge app's access to their data. BIM 360 Docs does provide 2-legged authentication option as well. If you want to keep the 3-legged authentication alive then can use the Refresh Token for that: https://forge.autodesk.com/cloud_and_mobile/2016/07/landing-your-forge-oauth-authentication-workflow.html
b) upload the file to your Forge app’s private bucket
This requires only 2-legged authentication since your Forge app has complete ownership of the storage bucket.
If you want to use the Forge API’s (e.g. the Viewer) you would need a Forge Subscription in both cases.
Which option is better for you price wise is something that you would have to look into.
2) Translate the file to SVF
If the file has been uploaded (by the user or using Data Management API) to an A360 type of storage then it automatically gets translated to SVF.
If the file has been uploaded to your Forge app’s private bucket, then you will have to request the SVF format explicitly using the Model Derivative API. The translation costs a certain amount of cloud credits that would be taken from your Forge Subscription allowance - check prices here. You can also purchase more cloud credits as needed.
3) Open the model in the Viewer
Once you have the SVF generated for a file then you can view it for free (i.e. does not cost any cloud credits, but you still need a Forge Subscription). You just need to find the URN of the model using the Data Management API, which is also free.