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.
Related
this is a question and possibly an improvement request. When I use the model derivative api to fetch object properties from a converted Revit model, I don't understand why it won't fetch the room data.
In my example we are only processing 2D views, and those 2D views are interactive, similar to BIM 360 I'm able to select a room and query its properties in forge viewer. So I know the properties are there in the conversion, but for some reason, Object Tree doesn't give room objects and thus it doesn't give room parameter data.
What I tried:
Convert a Model Revit Model floor plan using the model derivative API. Viewing the model in Forge Viewer should allow you to select a room element and query its properties, such as the screenshot below.
Image of Room Selected in Forge Viewer Floor Plan View
so we know the data for the Room objects is in the forge conversion.
Using the model derivative api to fetch the object tree and / or metadata, the room objects don't exist. I read something that seemed to indicate to generate master views, but I'm not sure I understand why that is necessary because the 2D conversions I am doing, we aren't generating master views, but still seem to have the room data accessible in Forge Viewer.
What I expected
It seems to me as a developer and user that the model derivative API could fetch the room objects and their data. Please correct me if I'm missing something.
I was trying some hands on with forge services, I want to fetch few object's properties inside of a revit model uploaded on bim360/ACC, for which I am calling two API's 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job' for translating the job to svf and then calling API "https://developer.api.autodesk.com/modelderivative/v2/designdata/" + urn + "/metadata/" (with urn of the translated job) (failed when passed urn of revit file directly)
Can we not directly get the metadata/properties without converting the file to svf? Since translating to svf is taking a lot of time for large files, my motive is to decrease the time to fetch the properties, can you share any solutions if you think of any please?
Yes, you are correct in assuming that you need to translate to SVF in order to access any BIM element properties at all. It's either that, or open it in desktop Revit and access the data there. Also discussed in the Revit API discussion forum thread on fetching metadata of a model using Forge model derivative API.
I'm working on an implementation (like Autodesk extension DropeMeExtension) that places tags on the 2D drawing screen belonging to the rvt file.
The location of the pin seems related to the viewport, so before loading the forge viewer, is it possible to determine the existence of the viewport of the item belonging to the rvt file in the API response?
What I want is get the items which have viewports without load the item to a forgeviewer.
(Before loading the forge viewer, I utilize manifest api(https://developer.api.autodesk.com/modelderivative/v2/designdata/{urn}/manifest) to determine if the children 2d item of rvt is a viewable 2D model.
Is it possible to get the information of viewport via the manifest api request or other ACC/BIM360 APIs?)
And I also want to know do I need to determine if viewports exist on models other than 2d floor plans.
This type of information is included in a JSON structure called "AEC Model Data" that is generated by the Forge Model Derivative service for selected design formats. You'll find it in the Model Derivative manifest with "role": "Autodesk.AEC.ModelData", and you can fetch and explore the JSON data without having to load the model into the viewer.
The format of this JSON is explored in these blog posts:
https://forge.autodesk.com/blog/consume-aec-data-which-are-model-derivative-api
https://forge.autodesk.com/blog/mapping-between-sheets-and-3d-views-aec-models
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
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.