Forge Viewer. Retrieving from Revit - autodesk-forge

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

Related

Use a Local Model file for Online Viewer

I would like to be able to use a local navisworks or revit file to be available when using an online viewer app on forge.
I have so far followed the tutorial here - https://learnforge.autodesk.io/#/datamanagement/oss/ that allows me to upload a file for viewing from the client side. I would like to remove the ability to upload from the client side and choose a local file to be viewed instead.
I would also like to know how to remove additional buckets / objects placed from the client side from the side menu (circled in the image)
Thank you in advance!
All our sample apps work like this (e.g. https://github.com/Autodesk-Forge/learn.forge.viewmodels/tree/nodejs):
all the client-side content (html, js, css) is in a specific folder (in case of nodejs samples it's called public)
all the rest is part of the server-side
all the Forge related functionality is exposed to the client-side through server-side endpoints
When the page is opened then the browser fetches the client-side components (1) - i.e. html, css, js files
When needed, the client-side code calls an endpoint on the server (2) which in turn reaches out to Forge (3) and passes back the result to the client
The only client-side part that communicates directly with Forge is the Viewer (4)
If you want to remove some of the functionality presented to the user, you can just remove them from the client-side part (e.g. from the html file)
In the server-side code, you can also combine multiple Forge calls: e.g. create a bucket, upload model file into it from the server, translate the model to SVF
If there are operations you only want to do just once (e.g. delete a bucket), you can also use utilities like https://oss-manager.autodesk.io/ or use this Visual Studio Code Extension: https://forge.autodesk.com/blog/forge-visual-studio-code
If you want to add controls to the toolbar this should be of help: https://learnforge.autodesk.io/#/tutorials/extensions
If you want to add something custom then you can use HTML/CSS/JS in your client-side code to implement those

View BIM 360 & Fusion models Unable to load model:Failed to load resource: net::ERR_NAME_NOT_RESOLVED

I did it according to the example on the official website, but the model couldn't be loaded。I don't know why, I followed the tutorial, and I checked the API should be open normally,I think I need help. Here's a screenshot of the error;
I see two possible explanations for this type of error:
The model is coming from A360 or Fusion Teams. If that's the case, please note that models uploaded to these applications are not translated automatically by the Forge Model Derivative service (hence the viewer error stating that there are no "viewables" to load). You have to open the designs in their owning application first to initiate the translation process, and then you can try accessing them from your own Forge application.
It's possible that the sample application is having issues with some of the characters used in the file names. Check if the same error happens when you name your files using English alphabet.

How can I use Autodesk Forge Viewer API for my web application?

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

How to embed Autodesk Forge model viewer into a website?

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

API to return "Configuration Specific" properties of SolidWorks files

I am currently looking at the article Solidworks Configuration Properties.
Once a part is uploaded we use the modelderivative API to extract the part information, this additional config data does not seem to be accessible anywhere through these APIs.
Is there another endpoint to call to be able to extract this data or is the only implementation currently handled through the viewer as demoed in the article?
Cheers