autodesk-forgeautodesk-viewerautodesk-construction-cloud

Is it possible to get the viewport information from Autodesk Forge (ACC/BIM360) API response?


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.


Solution

  • 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: