When using Model Coordination in BIM360, we can reposition a model with the "transform" function.
Is it possible to acces this transform value when loading models in the Forge viewer?
We are using the "AggregatedView" methods to load models.
This data is stored in the view of the specific model set version. you will need to use Model Coordination API to get it.
https://forge.autodesk.com/en/docs/bim360/v1/reference/http/mc-modelset-service-v3-get-model-set-view-version-GET/
This is a snapshot of my test. alignment tells data of transformation
It looks the API document above has not updated with the related information. I am reporting this to engineer team.
If you have not been familiar with Model Coordination API. The tutorial and Postman collection might help:
https://forge.autodesk.com/en/docs/bim360/v1/tutorials/model-coordination/
https://forge.autodesk.com/blog/postman-collections-model-coordination-api
Related
I'm trying to get the Discipline Property of a Revit Model uploaded to BIM 360. I was able to get the list of views by GET
https://developer.api.autodesk.com/modelderivative/v2/designdata/URL_SAFE_URN_OF_SOURCE_FILE/metadata
However there is no data on Discipline. Where and how can I get it?
I'm not familiar with "Discipline Properties" in Revit but I can comment on the Forge side of things:
The GET :urn/metadata endpoint simply returns a list of "viewables" that were extracted from the source design file. In case of Revit, these are typically 3D views or 2D sheets. I'm not aware of any other types of viewables that could be extracted by the Model Derivative service.
If the "discipline property" is a property available on some of the Revit elements, you might want to take a look at the GET :urn/metadata/:guid/properties endpoint. This one returns a JSON with properties of objects in one of the extracted viewables. Note that those properties are also accessible from Forge Viewer using its APIs.
In general, the Model Derivative service is trying to extract the "right" amount of information, making sure that the viewer gets all the important data for visualization and analysis, but also making sure that the size of the converted output stays in bounds. If there is some specific information in Revit designs that you need that is not extracted automatically, you can consider using the Design Automation service to process your Revit models in the cloud and extract all the information with your custom Revit plugin.
I want to translate multiple models using the Forge API. Currently we are able to translate a single model successfully.
Our requirement is to load multiple models in the Forge viewer. For that we need to translate multiple files in the Forge Model Derivative API.
To translate multiple models, is the same as translating a single model in your Forge Bucket storage.
Once you have created the SVFs, grab their URNs and load multiple models into the Forge Viewer using this blog post as your guide:
https://forge.autodesk.com/blog/loading-multiple-models-forge-viewer-v7
The trick is to set this Viewer option...
viewer.loadDocumentNode(doc, viewables,{
keepCurrentModels: true,
...etc
Let me know if that helps
Cheers
Michael
It is possible to update and save a custom text attribute in a Revit project hosted on BIM360 ?
Our customer's advisor say it is possible, but after taking a look to the Forge API I do not see any reliable way to do it.
I'm wrong or I've missed something ?
I guess they are referring out new API, Design Automation for Revit V3, the new V3 API is still in Beta, but it has the ability to do the following task related to Revit file, including modify your Revit model:
Create custom Revit family content
Automate model creation
Explore and analyze model data
Extract and produce automated reports
Modify existing models to maintain company standards
Automatically create documentation
Also please check Learn Forge about Modify Model as the sample on detail steps of implementation.
I'm trying to set custom properties for objects via their dbids but the API they provide doesn't seem to help to achieve that because it requires object to be selected and it doesn't save the property. I also look at POST references in Model Derivative API and PATCH in Data Management API, but they're used at document level, not model item.
All resources in a model are currently read-only, so you won't find any endpoint that allows you to modify a model or its properties.
A workaround is to use a custom database along with custom endpoints exposed by your own server that would allow you to modify overwritten properties. You can take a look at this live demo. The source code is available at Viewing.Extension.MetaProperties.
This article also deals with that topic:
Use Forge or Spreadsheet to Create Shared Parameters
We are trying to create a system that can displays BIM Model using Model Derivative and Viewer API, and provide functionality to use updated BIM Model, while preserving the mapping between element (currently we are using dbId) with some metadata.
The problem is that when we post Model Derivative translation process with updated BIM Model(updated meaning that we modified Revit file using Autodesk Revit or equivalent toolkit), the original dbId is lost.
While looking through viewer API, we've found that through model.getProperty with dbId, we can obtain a value called 'external-id', which seem to be preserved even after the update. However, this seems like that this can only be accessed in client side; there is no MD api that provides external-id property(correct me if I am wrong please).
As the last resort, we are trying to map dbId=>metadata mapping from original BIM model to dbId=>metadata mapping in updated BIM Model by creating a dbId=>dbId mapping using name as common feature, but we are worried that adding / removing BIM Model's element while updating would cause name mapping to be invalid.
TL DR; the question is:
Is there a way to obtain unique and preserving id per each ObjectId / dbId in Model Derivative translation process with updated BIMs?
Yes, exactly.
In Revit, the UniqueId is the safest method to persistently identify elements.
This UniqueId is available in the viewer, and unfortunately currently not in the model derivative API.
For an immediate solution, I suggest that you create you own shared parameter in Revit for all elements that are of interest to you and populate it with the UniqueId value. Then, that information will become available to you in the model derivative API as well.