Does Autodesk recommend offline forge viewer? - autodesk-forge

Does Autodesk recommends offline forge viewer?
what is advantages of offline forge viewer over online?
I am referring this tutorial, but struggling with some error as follows:
if there is any working example of offline forge viewer please drop link here.
Thanks in advance!!

Does Autodesk recommends offline forge viewer?
We are neutral on this - there's no recommendation as to whether to load the model from our service or your own ... it's entirely a matter of your business requirements ...
what is advantages of offline forge viewer over online?
There's no pros and cons loading the model from our service or yours ... it really on your requirements such as confidentiality, security (of your Forge app tokens/credentials) and network proximity etc ...
The error you ran into suggests the SVF file could not be loaded so check these:
Viewer only supports http/https and not any other protocols (so URLs starting with file:/// won't work)
See your browser's console output for errors
Make sure you've provided the correct path to the SVF file to Viewer
Post your code if you still have problems so we can look into it...

Related

How can I use Audodesk Forge Viewer to view 3d translated model in Autodesk Doc

I am developing My own project to view model from file in Autodesk Docs, but I am really confuse, How should I start from? for now I use 2 legged Authentication and got and access denied.Can someone help me to summarize overview steps to finally my custom viewer can view it?
Overall steps to view forge model in forge viewer.
I'd suggest to start with one of our tutorials, for example:
Simple Viewer - this tutorial guides you through the development of an application that manages the files of its users (designs are stored in a custom OSS bucket owned by the application)
Hubs Browser - this tutorial might be better for your use case as it builds an application that can access designs of its users in other APS applications such as Autodesk Docs, Autodesk Construction Cloud, or BIM360

Autodesk Forge viewer: Directly load a SVF?

As the official documentation states, you can upload a source file to OSS and translate it, once in your bucket, to a SVF with the Model Derivative API.
But is it possible to skip the translation step, directly uploading a SVF project (for example, one of these: https://forge-rcdb.autodesk.io/gallery) and loading into the web viewer?
I haven't been able neither to do it nor find any documentation yet.
Yes, that is possible. Instead of loading the Model Derivative service "manifest" using the Autodesk.Viewing.Document.load method, and then loading a specific "viewable" from the manifest using the Viewer3D#loadDocumentNode method, you can just call the viewer's loadModel method and provide an actual URL to your SVF file.
Note however that the Forge Viewer assets (JavaScript, CSS files, icons, etc.) should still be coming from the Autodesk domain. In other words, we do not officially support running the application offline. If you need to support workflows where your users could be temporarily disconnected from the internet, please refer to https://forge.autodesk.com/blog/disconnected-workflows.

Embed the Autodesk Viewer in a web page

In our web application, we want to view AutoCAD files using Autodesk viewer API.
As per our requirement we want to select the file and need to open directly in auto-desk viewer site, where all default options like 2D, 3D views are available.
Is it possible to view those files, directly in Autodesk viewer, instead of creating our own viewer?
We do have a minified online viewer that takes a svf - pls make sure all svf assets are available at the same location and open to public access with CORs allowed:
https://autodeskviewer.com/viewers/latest/viewer3d.html?svf=url/to/your/svf (make sure to put in the url to your svf)
But this is NOT an official setup of any sort and is subject to change w/o notice. You are very much encouraged to develop your own, just a few lines of code would do this trick if you already have your models extracted.
Here's a few good places to start:
https://forge.autodesk.com/en/docs/viewer/v6/tutorials/basic-viewer/
http://learnforge.autodesk.io
Tools:
http://models.autodesk.io
https://extract.autodesk.io/

How to use autodesk viewer api to view .dxf files on my website?

I have around 200 .dxf files on my server. I would like to integrate the autodesk-forge viewer so that people coming to my website can view the drawings? I do not see any example as such online which can help me in that? Do you guys have any examples which can assist me in this?
I do not want to upload the files on the cloud and use the embed link rather I just want to use the viewer api and pass my .dxf files from my server to view those on my website.
Any help will be highly appreciated?
I am afraid this is not possible, the Autodesk Forge Viewer requires you to upload the file on the Autodesk storage and use the Model Derivative API to prepare your DXF files to be viewed in the Viewer. You do not need to keep the DXF on the Autodesk storage after the process, but this is a required step.
If you follow this tutorial, you will be able to see you DXF files onlines. All resources are protected, but if you want to delete the seed file (aka the DXF file), you need to call this endpoint at the end of the tutorial steps.

Autodesk Viewer - resources caching on the client

I am using autodesk viewer api https://developer.autodesk.com/en/docs/viewer/v2/overview/
We are using Angular/Ionic2 to show the the model in our tablets.
What I observed is the veiwer resources are not cached on the client
eg resources:
objects_attrs.json.gz
objects_vals.json.gz
0.pf
1.pf,
etc.,
How can I cache these resources on the client?
Here is a bubble extraction example (https://github.com/cyrillef/extract.autodesk.io), and its' live demo is https://extract.autodesk.io. This might help you to download the derivative files from the Forge service, then use the viewer under the offline mode.
And you might be interested in this blog article Viewer on airplane mode. It demonstrated some basic scenario for caching derivative files.
Hope this help.