How to know file size of translated SVF file in forge viewer - autodesk-forge

I have using for forge API services for Revit and Naviswork files display. In that how to check translated SVF file size.
Please provide the solution to check file size of translated SVF file.
Thanks.

As soon as you load a model of the Viewer, it will show the memory used (see console output). As the viewer loads files on demand, the total SVF size (on disk) should not affect your app.

Related

Export Revit file format as Gltf or Svf and view offline in Forge-Viewer

I want to view the revit file offline in Forge viwer. For this, I need to convert the rvt file to svf or gltf file format. I couldn't find any free open source code to export as svf. Although I managed to export it as a gltf file format, I could not view this gltf file in forge-viewer due to some errors that I could not resolve. Can you share the open source code that I can use to export the Revit file as svf or gltf format without any errors?
Unfortunately, The SVF file format is Autodesk's private property designed for the Autodesk Forge platform, so the only way of exporting SVF is via Forge Model Derivative API. There is no such open source tool to generate SVF.
For glTF, it depends on your Gltf file structure. As I know, Forge Viewer doesn't fully support glTF 2.0 specs. See https://forge.autodesk.com/blog/gltf-20-support-forge-viewer
Could you share a non-confidential reproducible glTF file demonstrating the issue to forge (dot) help (at) autodesk (dot) com? We can help pass it to our engineering team for investigation.

Autodisk forge files

I was wondering, the dwg files are hosted on my server, to use the viewer API do I need to upload it to forge platform then I can use the viewer API?
if yes is there API or otherways to upload the files to the platform I do not want to do it manually
if no this means it's ok I can use the viewer on the files on my server
Regards
In order to show any model (other than PDF) in the Viewer, you need to get it translated to SVF, which is the Viewer's format. This translation can only be done on our servers, so the file needs to be there at least while the translation is running.
https://forge.autodesk.com/blog/showing-files-viewer
We have a nice tutorial on how this can be done: https://learnforge.autodesk.io/#/tutorials/viewmodels

Forge Viewer Offline file viewing

Please let me know how to view the Revit file in my local environment in the Forge Viewer without doing any file upload to the cloud.
Also the Link "Prepared a File for the Viewer" it is not working.
This is unfortunately not possible - Forge is a Cloud service only API platform. You need to upload your files to the platform to extract the data, and then visualise it. Here is a quick and complete tutorial.

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.

Why Layer detection isn't possible in Autodesk forge Api for PDF files?

I want to import PDF file in Model derivative API and work with different layers. But it is not detecting layers in PDF models as it does in DWG files. Layer manager option is not visible. What to do?
In cases where the Model Derivative service isn't extracting enough information from your input files, you have a couple of options:
if your input file is a AutoCAD, Revit, Inventor, or 3ds Max file, consider extracting the additional information using the Design Automation service
if your input file is a PDF, consider:
viewing the PDF directly in the viewer (see this blog post for more details)
using a 3rd party library (e.g., pdf.js) to extract the additional info yourself