Forge Viewer - can we make selections/highlight on loaded models and save in database so that we can show that selection next time user loads it? - autodesk-forge

Forge Viewer - can we make selections/highlight on loaded models and save in database so that we can show that selection next time user loads it?
Is this possible? Or how can we add sticky notes/RFI information /issues spot in the model.
I am working in a web application, how do we manage that information and save to some database so that we can show that information later when the same model is viewed again?
Thanks in advance

You can get or set the selection using Viewer APIs. Specifically, the getSelection method returns a list of object IDs that you can store wherever you want, and the select method accepts a list of object IDs that you want selected.
For more advanced extensions, feel free to browse our samples over at https://github.com/Autodesk-Forge. One demo that could be of particular interest is the "Forge Digital Twin" (source code, and live demo) which stores "reported issues" to a database, and later shows them as 3D annotations on the model:

Related

Trying to show room information in Autodesk Forge / Bim360

Okay so, I'm trying to show room information and geometry from a Revit project on Forge. I've made the call to https://developer.api.autodesk.com/modelderivative/v2/designdata/jobs with Setting advanced/generateMasterViews field to true, yet, even if I get a correct response, and even from https://developer.api.autodesk.com/modelderivative/v2/designdata/:urn/manifest I get that the model is successfully translated but still, no room information. I've looked in Forge for the room information with no luck. Afterwards I've tried to publish it to Bim360 knowing that B360 automatically gets the room information and geometry. And for a moment it looked like it worked. The model displayed the rooms and the information
:
So, I close B360 and try after a few seconds I open it again and... :
No geometry, no room information. Nothing. Maybe is something wrong with the model? I've tried deleting and recreating the rooms in revit, modifying the Publish settings etc but this isn't my job, I only have basic notions as I'm a programmer. Anything?
*EDIT : After further tries, I've noticed after every model update on B360 I get room geometry on the first open. Only the first time I open it.
Okay so I've solved it. I'ts was not a forge nor B360 error, it was an error on the model! The problem was Revit was not generating volume for the rooms because It was told not to!
I actually had Revit Area and Volume Computations on Areas only (which is faster, but doesn't generate volumes for rooms) To change this i just had to :
1.
2.
Then click OK and save the model. Afterwards you have to upload the file and translate it by using generateMasterViews! And done! You'll have your master view with room geometry.

Forge API: Get all changed items

I need to get a list of all changed items in my project in BIM 360. Can I do this using forge-api.
Ho, regarding with the latest question [If my service is not available and I will miss some webhook events, how can I get all the changes that were made after the last webhook event received] :
If your requirement is to know which items are changed in one folder of Docs, Search API with filter can be of use. e.g. the endpoint below will return all items which are updated since a certain time.
https://developer.api.autodesk.com/data/v1/projects/{{project_id_with_b}}/folders/{{one_folder_id}}/search?filter[attributes.lastModifiedTime]-ge=2019-10-15
More filters options are described at
https://forge.autodesk.com/en/docs/data/v2/developers_guide/filtering/
While if you wanted to know all updates in one call, I do not see currently the way is available. While, Activity API is on the way, it might be helpful to know all activities during a certain dates, then you could filter out what you are interested in and locate the corresponding module>>files/resources etc.. but Activities may probably be categorized with specific scopes e.g. admin activities, project actives, issue activities etc. so it is not one call knows all updates.. And these APIs may not be exposed in the same time.

wordpress make a wizard to collect information from user and save it in a database

I am attempting to make a step through wizard in word press. I have a website with a nice theme and everything and all pages work fine. What i want to do is in one of the page collect some information from the customer. When they select one of the buttons on the site i want them to end up on a page that has a bunch of options. Based on their selection i want a certain information captured and then the wizard moves to the next page.
Step by step i want to collect 5 or 6 pieces of information that the user selects. Kind of like a wizard that the user can select their options and that gets saved to their profile. Now i am not exactly sure how database management works in word press, how i can create rows or columns based on what i need and how i can save information to these. All the word press tutorials that i find are basic and dont show this type of behavior and data manipulation. Can someone point me in the right direction where i can learn about how to set up databases and collect information from the user?
Thanks,
If you want to store the data for user you can first create User Meta Fields. You can follow this link on how to create User meta fields
https://developer.wordpress.org/reference/functions/add_user_meta/ . You can then save the data from the form in this meta fields using update_user_meta()
https://developer.wordpress.org/reference/functions/update_user_meta/. You can fetch this data using function get_user_meta()
https://developer.wordpress.org/reference/functions/get_user_meta/
I hope this helps you !!

How to access Google Analytics Filters for a specific View or Property via API

I am trying to access filters within a specific view for Google Analytics via the API. From everything I can see I can only access the filters for the entire account and there is no denoting within the response which Web Property, Profile, or even View that filter is for.
Looking to either be able to access just the filters within a View OR be able to denote which view a filter lives in within the account response, because then I can loop through those and just pull out the filters for the specific view I am looking for.
Ultimately I am trying to build a way for me to list all of the filters I have across multiple accounts and update things en-mass, like when someone moves or has their IP address updated. I am currently using Google App Scripts which has the built in Google Analytics Service. Using that, I can quickly get the filters with
var filters = Analytics.Management.Filters.list(accountID);
Logger.log(filters)
but as you can imagine (or test if you are so inclined), this logs/returns ALL the filters for the Account ID listed. This response shows the following info (redacted info and changed formatting a bit to display nicer)
{accountId=XXXXX,
parentLink={
href=XXXXX},
excludeDetails={
expressionValue=XXXXX,
field=XXXXX,
kind=XXXXX,
matchType=XXXXX,
caseSensitive=XXXXX},
kind=XXXXX,
created=XXXXX,
name=XXXXX,
id=XXXXX,
type=XXXXX,
updated=XXXXX,
selfLink=XXXXX}
none of which shows the Web Property, Profile, or View.
So, how can filters within a specific view be accessed or the view of filter be seen?
You’re looking for profile filter links
https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/profileFilterLinks#resource

How do I make a url that is specific to some set of data with out a html file?

For example, facebook. I have a list of different teams that shows overall data for that team, but the goal is the user will click on their team and send them to page that is detailed information about their team. My client wants the user's team name to be within the url so they can save the page as a favorite.
How I do this with out making a html file for every single team that gets made?
Im using Django for back end.
If you're using django then there is certainly no sense in making html for each team. You should make a template and populate this template with the data you're getting from your database (models.py) according to url (urls.py) and the appropriate view (views.py).
This is fairly basic django usage covered extensivly in the offical tutorials and the django documentation. Read it and use it, cause there is no shortcut. And last but not the least - enjoy cause such good tutorials and docs you won't see every day.