Autodesk Forge - Capture the image of the issue location - autodesk-forge

I saw that when generating a PDF using BIM360, an application sends the PDF by email and in the PDF content there is a screenshot of the location that the issue was registered in, I am creating a customized report that would be necessary to have the same type information, in this case, a capture of the issue's location, has anyone managed to implement this?

You would need to take a snapshot from the screen where the Issue is visible, something like described at https://forge.autodesk.com/blog/screenshot-markups

Related

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

Load only specific GUIDs as priority in the first load of a file in Autodesk Forge Viewer

I currently have an application where the 3d rvt/svf files are loaded on the browser using the Autodesk Forge Viewer. The files when opened take a while to completely load.
I want to be able to load a file in the viewer in such a way that a select few guids load first or show up on the screen before others. This is needed to improve performance of the viewer for larger files, giving the user something basic to start with and then allowing them to show all the elements in the 3d file, once everything is loaded.
I couldn't find anything related to this in the API reference.
Any help is highly appreciated.
Thank you.
You can specify the dbIDs of objects you want to load in the viewer.loadDocumentNode method. Please see https://forge.autodesk.com/blog/minimizing-viewer-workloads-loading-models-partially-selected-components-and-features-only for more details.

Forge Viewer. Retrieving from Revit

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

Embedded Images in SSRS Reports not Displaying - Permissions Issue

I have a logo at the top of all my reports that I have as an embedded image.
These reports are displayed in an ASP.Net web app via the SSRS web service interface - all pretty standard stuff but the image doesn't render - I just get a broken link.
There are a number of possible solutions for this problem and I've tried a few things including setting UseSessionCookies to false in the ConfigurationInfo table.
What I've noticed is that the image displays fine when I change the anonymous account of the consuming web app from a least privileged service account to my own user account.
I do not understand why this and can't work out what special permissions are needed by my web app's service account to be able to view embedded images in reports.
Can anyone help?
Ok, problem solved. Kind of. The problem isn't limited to embedded images and occurs because I am not using the reporting services viewer.
To summarise:
1) when your web application is making the call to the report server it is fully authorized to do so. A SessionID is generated that is ONLY available to the web application account (i.e. the Service account under which the app runs).
2) the web app outputs the RAW HTML4.0 to the screen.
3) the browser receives the HTML and tries to retrieve the images referenced in the HTML.
4) the browser is running as your user account (e.g. domain\username1)
5) the report server receives a request that looks like:
6) now the SessionID listed in the URL is not associated with domain\username1, so report server claims it does not exist.
When you set the app domain to use the domain\username1 account, then the SessionID happens to be associated with your the account so suddently things 'work'. But the moment real users try the system they complain that the images are missing, since their domain\usernameN does not match the app pool account.
The solutions to this problem are as follows:
1) use the Report Viewer control. This will ensure that the URLs received by the Browser will point back to your web app and your web app identity will be used to retrieve them from the report server.
2) in your web app code, parse the HTML4.0 that you get back from the Render call, fetch and cache all the images, re-write the HTML4.0 links to point to the cached images stored by your web app and then send it to the browser (if this seems complicated... then use the Report Viewer control since it make the scenario work)
3) you can try to use the MHTML output format, this will produce a fully qualified report with images embedded in the since binary stream. The consequence of this is it is harder to embed it within an application page... but not insurmountable
I chose to use a variation on 2) because I don't want to use the report viewer. The logo I'm trying to display is already hosted in the calling web app so I just replace the src attribute of the img tag in the response returned from the SSRS report execution service with the url to this location.
I really don't want to use the report viewer as suggested as the best solution to this issue. Why SSRS has to use session information to return something as simple as a logo that is displayed on all reports is beyond me.... It has taken ages to get to the bottom of this and the solution isn't especially pretty....
Is this an external image? Take a look at this MSDN article that explains the permissions needed for retrieving an image:
When the report is previewed in Report Designer, preview uses the
credentials of the user to display the image. When the report is run
on the report server, the report server uses the unattended execution
account to retrieve the image. If the unattended execution account is
not specified, the image is retrieved using no credentials (anonymous
user account). If either of these accounts have insufficient rights to
access the image, the image will not be displayed in the report.
I would check the permissions on the image in the Report Manager.

Chrome Extension Help - Send data to file to display notification

So I am creating a Chrome Extension, and I've reached a point where I want to create a desktop notification that links to a forum thread. I'm using jQuery to retrieve data from a server, which contains the ID of the thread. Since the only way to do HTML in desktop notifications is to put it in a separate file, I need some way to pass the data onto the external notification file.
I've looked into message passing (http://code.google.com/chrome/extensions/messaging.html), but the data doesn't stay while the notification file is called.
Are there any ideas?
Thanks very much in advance! It is greatly appreciated.
Carl L.
From a notification you can call your background page directly:
chrome.extension.getBackgroundPage().getCurrentThreadId();
You can also use URL parameters (which you would need to parse on notification's side):
webkitNotifications.createHTMLNotification("notification.html?threadid=100");