Is it possible to translate (Revit) models from non-Autodesk cloud storage services using Forge Model Derivative API? - autodesk

I just tried some of the Forge boilerplates on Github.
Some examples asked me to login to BIM 360 to fetch some model data. I was wondering if it would be possible to load the (Revit) models from Dropbox, Google Drive or OneDrive, or even upload them from the local storage?
PS: Forge is awesome, kudos to Forge Team!

We have multiple examples that illustrate how to integrate Forge with cloud storage providers under the same github org:model.derivative-nodejs-box.viewer, data.management-nodejs-integration.box, model.derivative-nodejs-google.drive.viewer
The point of using 3-legged API is precisely to let your app access customer data that is already hosted on Autodesk Cloud. If you want use a storage mechanism that is specific to your app, then you need to use 2-legged Object Storage Service, see Create an App-Managed Bucket and Upload a File
In order to fire a translation on a CAD file, you have to upload your data to Autodesk Cloud first, you can then load it from there in the viewer. However you could also download the svf package using the API and then serve those as static resources from your own server. Take a look at this sample for more info: extract.autodesk.io.
Hope that helps

Related

BIM Metadata Extraction - Automation - Using AWS S3 bucket and Autodesk Forge Model Derivative API

We are trying to implement an automation workflow as described below. Please let me know if it is possible to implement or not.
The workflow is going to be like this.
A user uploaded the Revit model to the AWS S3 bucket
2)The Autodesk Forge model derivative API automatically fetches that model from the AWS S3 bucket
The model derivative API then extracts the metadata from the translated model and exports the metadata into an SQLite or JSON format and saves back that database file into the same AWS S3 bucket.
This is feasible. you may combine a couple of services of AWS. I had similar practice long time ago. Probably it could be a reference
https://forge.autodesk.com/blog/2-legged-workflow-model-translation-part-1
https://forge.autodesk.com/blog/2-legged-workflow-model-translation-part-2
Note: some usage of AWS services may have changed. Forge side, the endpoints (using SDK) may be still working, but you also need to double test adjust if anything is tuned.

Can you query, translate, and open .dwg files from web.autocad.com's Web & Mobile directories?

Background: I have a simple integration (Client App) using the Forge API that can: create a bucket, upload a .dwg file to the object storage service, translate the file (and get translation status), query the files in a bucket, and open any of the files in the bucket in the Viewer. I'm now researching the possibility to pull files that are made/modified from the AutoCAD Web & Mobile App (https://web.autocad.com/) (aka the Web App) via the forge API. Is this possible?
Usecase: We want some personnel to be able to modify the underlying files, whereas others just need to view it from an existing application integrated through forge. The idea would be the engineers would modify the file in the Web App, and then from the Client App using the forge API, I want to query to see if the base file has been updated since the last time it was translated for the viewer. If newer, re-translate the file and view it. If not, just view it.
Attempts: I assumed the files would be in a project in a hub in the /project/v1/hubs/ in the data management API of Forge, but I'm getting a response of "You don't have permission to access this API". I am in the trial version of forge, so that may be the issue. And the Web App is currently "free for everyone for an extended period." Is it possible that I just need to purchase one of the subscriptions to be able to access the files I have on the web app? Or am I looking in the entirely wrong place?
So, concisely, here are the questions:
Are files that are saved on https://web.autocad.com/ accessible via the Forge API? How, if yes?
If yes to #1, do these files need to be converted using the Forge API to be render-able in the Viewer?
Thank you for your time and help!
I would say, it's a pretty cool idea and workflow, but unfortunately, AFAIK, we don't have direct access to file on https://web.autocad.com/ by Forge API currently, only data within Autodesk SAAS applications include BIM 360 Team, Fusion Team (formerly known as A360 Team), BIM 360 Docs, A360 Personal could be accessed directly, refer https://forge.autodesk.com/en/docs/data/v2/developers_guide/overview/, But some ideas:
I am not expert on https://web.autocad.com, but I know it provides the connection to cloud storage including Box, Dropbox, Google Drive, and Microsoft OneDrive, depends on which cloud storage you are using, you should pick the corresponding API to access the file, and maybe check if the file is changed, all of that is nothing to do with Forge, but the cloud storage.
If you can check the file version with the API from cloud storage provider, then you should be able to exchange the file between the cloud storage and Autodesk OSS(check sample https://github.com/Autodesk-Forge/bim360appstore-data.management-nodejs-transfer.storage ), you can use the Forge to translate and view files on Autodesk OSS.

How to query for TimeLiner data from Forge API?

I used the TimeLiner plugin for Navisworks to create a 4D timeline. I'm now trying to grab this TimeLiner data from the Forge API. When I log into BIM360, I'm able to load a model into the viewer and see all TimeLiner information within a browser. However, I don't see how I can accomplish this with the Forge API. Is there an available API for this? Or is there another way to grab this info?
Unfortunately, the Timeliner properties are not extracted by Forge service (which BIM 360 is running on), and also some other properties. This blog tells in detail:
https://forge.autodesk.com/blog/updates-navisworks-nwd-translation-engine-coming
Currently, we do have an advanced option to override default configurations to tell NWD/NWC translator if it needs to translate Timeliner properties. BUT, this option is about Forge Model Derivative API ONLY.
While in BIM360 Docs UI, there is no any plan to expose options to let users override default configurations when they upload files. So for now, users uploading NWD/NWC files to BIM 360 Docs will lose Timeliner properties. Consequently, you will have to open those files inside Navisworks to view Timeliner data or take advantage of the Navisworks API to extract the data inside Navisworks. We apologize for the inconvenience.
However, we have legged a wish BIMPLT-698 with BIM360 engineering team to evaluate the possibility of adding options for end-user when they upload the model files. You're welcome to track the updates in the future via sending an email quoting this wish id to the Forge support channel.
Note. Triggering your own translation job to override your desired translation configurations via Forge Model Derivative API on files uploaded to BIM360 will charge you for cloud credits. You will have to consider the extra costs if you want to do so, and see here for the pricing: https://forge.autodesk.com/pricing

Use Forge to Access Change Report from BIM 360

Is it possible to use Forge with some BIM 360 API to gain access to the changes in a model from one version to the next?
Unfortunately, there is no API available for doing BIM360 model comparison on Forge currently. However, here are two workarounds you might be interested in:
Compare changes via Forge Viewer: https://forge.autodesk.com/blog/comparing-versions-viewer
Dump changes via Revit Addin, and then integrate its results with Forge.
What you can do though is to leverage Webhook to get notified when a new version is “upserted” to the Data Management API. See docs here:
Official Doc: https://forge.autodesk.com/en/docs/webhooks/v1/tutorials/create-a-hook-data-management/
Sample Code: https://forge.autodesk.com/blog/webhooks-and-bim-360-c

Interconnecting autodesk forge and Vault api

Currently I'm working on a project where i need to use forge viewer and vault APIs
The system i'm developing should get files from vault and display those in the forge viewer.
I couldn't find any guide or references on how to connect both API's to achieve my goal.
Vault and Forge are two different APIs. And currently, as I know, we have not integrate Vault file system with Forge services, which means the Vault files cannot be accessed in the role of users (while some other cloud products support such as BIM 360, Fusion 360, because they are built on Forge services as well)
So, you would need to use Vault API to get the files from Vault, and use Forge web service to upload and translate the file, in order to view the model in the Forge Viewer.
I am not sure if you have played with Vault API or Forge API. These are just some materials which might be useful:
Using the Vault API and View and Data API Together to Download and View
Assemblies
https://www.autodesk.com/autodesk-university/class/Using-Vault-API-and-View- and-Data-API-Together-Download-and-View-Assemblies-2015
This was delivered by our colleague in 2015 Autodesk University. At that time,
the technology of viewing model in the browser is called View and Data. The
basic workflow is similar to current Forge Viewer.
Vault APIs tutorials:
https://www.autodesk.com/developer-network/platform-technologies/vault
which contains the materials how to get started with Vault. As to the specific topics on downloading files, you can refer to the handout in the above AU class
Forge Viewer tutorials
https://forge.autodesk.com/en/docs/viewer/v6/tutorials/
And I also recommend the other step by step tutorial:
http://learnforge.autodesk.io/
Should you have any questions in the process, please feel free to pose the questions with autodesk-forge tag.