I have created a web application for viewing models using the AutoDesk Forge Viewer, and I want to be able to add this onto a website. I used this tutorial: https://learnforge.autodesk.io/#/tutorials/viewmodels (using node.js for the language option).
The goal is to have the user access the viewer application from the website. I have been using VS code live server for testing. However, when I link the page that has the viewer into my own website, the viewer does not load the buckets or allow for creation of new buckets. It is just stuck on a loading symbol like below:
[Loading screen][1]
Could I please have the following questions answered:
What is the proper way to embed this application onto a website in the manner I have described above?
What part of the code controls where the buckets are loaded in?
Thank You.
[1]: https://i.stack.imgur.com/4Xlfv.png
LearnForge tutorial is an example on how to work with Forge API. As a web app, it depends on how the developer(you) designs the user interface, workflow, and data management.
e.g. you can remove the panel of bucket & object lists ,keeping the viewer only in the UI. while you will need to design how to provide the object id (urn) which will be loaded in the viewer. Normally, you would need to setup your own users management, logging process etc, and set your own user permission. Then the user logs in, the web app lists all files (objects) he has permission to check, and when one file is selected, get the urn and load the model in Forge Viewer.
if the end user of your app is BIM360 users, you could take advantage of BIM360 data management workflow, which follows the same permission specified with BIM360. Then the other tutorial will be a good start.
https://learnforge.autodesk.io/#/tutorials/viewhubmodels
In any case, the workflow and UI are defined by yourself. I hope this explains. If you have any further questions that need a meeting call, please feel free to check the calendar of our team:
https://calendly.com/autodeskforge
Related
I want to use Autodesk forge for my web application that allows my clients to save their model files and view them online. However, the problem I am facing is that the viewer is not unique for the clients as it runs on a client secret key. So, once I upload any model in the forge viewer, it appears to all the clients who are using it. So, how can I make sure that I only get the viewer that just opens the models that are present in the project of the client? Is there any way by which I won't have to use the access key so that the models do no get saved up alongside the viewer?
You have to implement user authentication and keep their files separate (e.g. separate buckets named ) - or at least know who should have access to what.
Authentication could be based on an Autodesk account as well if you wanted. Anyone can have such a thing for free.
I hope you are keeping the client secret on the server so the clients don't have access to it and only pass to the client an access token with scope viewables:read only - that could not be used e.g. to list the contents of buckets - see e.g. https://learnforge.autodesk.io/#/tutorials/viewmodels
I am new to autodesk forge and am tasked with creating a website with it. The website must include a login/authentication system and the forge viewer to allow for customers to view their systems. I have set up the forge app which allows users to view their models with NodeJS and deployed it to heroku. This is the link to the tutorial https://github.com/Autodesk-Forge/learn.forge.viewmodels/tree/nodejs
I am now trying to link that app/program with a simple login/authentication system but have been unsuccessful. Do I need to use a nodejs authentication system as I have used that for autodesk forge. Also, how would I go about hiding certain models from the viewer based on who is logged in. Any examples where someone used a login system with forge would help a lot, also any tips and any guidance would be very much appreciated as I am very new to web-design.
Cheers!
Update:
Thanks for all your help
I am now using the three legged authorization. I am wondering if it is possible if users can log into a specific autodesk account, where certain models are hidden based on which user is logged in.
I am trying to create a website for our customers where they can log in and view our models that we provide for them. They will only have access to the models through the app. However certain models must be hidden as one customer should only be able to view the models that apply to them, not all in the account. Is something like this possible. Thanks for the help.
Cheers!
The tutorial you have followed uses a simplified, two-legged authentication where your application's users do not have to log in. The application authenticates itself to Forge.
If you'd like to include three-legged authentication where your users would log in with their Autodesk account and access their own data, I'd suggest that you follow the 2nd tutorial on the same site: https://learnforge.autodesk.io/#/tutorials/viewhubmodels. This one explains the 3-legged auth in detail.
In the new Docs 360, there is the phase view on the left side.
Phase image
In this project, the phases are bounded together on a single document, but on other project, the phases are created as a seperate revit document which I assume to be related to the size involved for each view(is this true?). On testing , these seperated revit phase document are not viewable on forge web-api (the error i received is GET /api/manifest call failed Not Found). The question is, Would it be possible to replicate the phase view in Forge? And if no How do I open the seperate revit phase document created when uploading to cloud.
And in previous question I've asked about the possibility of getting room information in forge which I've been told to be impossible. Upon inspecting the phase view in docs, I've come to notice that there is the Room element exist (clickable etc etc). Is this a bug ? If no, does bringing phase view to the forge web app will allow me to click on room element?
Room Image
I have talked with our engineering team, and learnt that the room/space are exported by Revit extractor now. But currently, they are only supported in BIM360 Docs, not in Forge Viewer unfortunately.
I set upp my App to retrieve properties information from Revit, meaning it currently retrieves Constraints, Identity Data, Phasing, etc.. But I want it to retrieve documents, links, images as well.
I created this Parameter to test:
Type Parameter: Image
Group Parameter under: Graphics
Then I added this parameter to an object and uploaded a .png. When I check the result inside the App, only the "Name" of the parameter under "Graphics" appears. No content. Only blank. Is it supposed to be like this or is there anything I could do to make the file upload work?
The best way to handle that at the moment would be to write your custom Revit addin that can connect to Forge and upload your model. When doing so, using the Revit API, you could parse the model properties and store the embedded pictures and documents to your own cloud database/storage.
When loading the model in the viewer, you would load a custom extension that does something alike the blog post you are referring to, connecting to your own database and showing the embedded content.
More elaborated demos of MetaProperties are available here and here with full source code here.
Hope that helps
I have a requirement to build an application with the following features:
Statistical and Source data is presented on simple HTML pages
Some missing Source data can be added from that HTML page ( data will be both exact numerical values and discriptive text )
Some new Source data can be added from those pages
Confirmed and verified data will NOT be editable via the HTML interface
Data is stored and made continuously available via the HTML interface
Periodically the data added/changed from the interface needs to be pulled back into the source data - but in a VERY controlled way. All data changes and submissions will need verification and checking - and some will trigger re-runs of models ( some of which take hours to run ).
In terms of overview architecture I have:
Large DB that stores and manages the data - this is designed for import process's and analysis. It is not ideal for web presentation or interface
Code servers that manipulate the data for imports and analysis
Frontend server that works as a proxy to add layer of security to S3
Collection of generated html files on S3 presenting the data required
Before reading about the Google Drive Realtime API my rough plan was to simply serialize data from the HTML interface and post to S3. The import server scripts would then check for new information, grab it, check it, log it and process it into the main data set.
That basic process however would mean that once changes were submitted from the web page - they would be lost from the users view until they had been processed by the backend.
With the Google Drive Realtime API it would appear I could get the best of both worlds.
However for the above to work I would need to be able to access the Collaboration Document in code from the code servers and export the data.
The Realtime API gives javascript access to Export and hand off to a function - however in my use case I want to automate the Export from the Collaboration Document.
The Google Drive SDK does not as far as I can see give any hints on downloading/exporting a file of type "Collaboration File".
What "non-browser-user" triggered methods are there for interfacing with the Collaboration Documents and exporting them?
David
Server-side export is not supported right now. What you could do is save the realtime model to a regular drive file, and read from that using the standard Drive API. See https://developers.google.com/drive/realtime/models-files for some discussion on different ways to setup interactions between realtime models and Drive Files.